[master 1/3] Get rid of interface's entryWindow() and EntryWindow.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The only place it is used is in textw/add_drive_text where we in fact use
the snack EntryWindow class directly.
---
 pyanaconda/gui.py  |   32 --------------------------------
 pyanaconda/text.py |    8 --------
 2 files changed, 0 insertions(+), 40 deletions(-)

diff --git a/pyanaconda/gui.py b/pyanaconda/gui.py
index aa7d291..9250660 100755
--- a/pyanaconda/gui.py
+++ b/pyanaconda/gui.py
@@ -866,32 +866,6 @@ class DetailedMessageWindow(MessageWindow):
         if run:
             self.run(destroyAfterRun)
 
-class EntryWindow(MessageWindow):
-    def __init__ (self, title, text, prompt, entrylength = None):
-        mainWindow = None
-        MessageWindow.__init__(self, title, text, type = "okcancel", custom_icon="question", run = False)
-        self.entry = gtk.Entry()
-        if entrylength:
-            self.entry.set_width_chars(entrylength)
-            self.entry.set_max_length(entrylength)
-
-        # eww, eww, eww... but if we pack in the vbox, it goes to the right
-        # place!
-        self.dialog.child.pack_start(self.entry)
-
-    def run(self):
-        MessageWindow.run(self)
-        if self.rc == 0:
-            return None
-        t = self.entry.get_text()
-        t.strip()
-        if len(t) == 0:
-            return None
-        return t
-
-    def destroy(self):
-        self.dialog.destroy()
-
 class InstallInterface(InstallInterfaceBase):
     def __init__ (self):
         InstallInterfaceBase.__init__(self)
@@ -1092,12 +1066,6 @@ class InstallInterface(InstallInterfaceBase):
         dialog.createDialog()
         return dialog.run()
 
-    def entryWindow(self, title, text, type="ok", entrylength = None):
-        d = EntryWindow(title, text, type, entrylength)
-        rc = d.run()
-        d.destroy()
-        return rc
-
     def detailedMessageWindow(self, title, text, longText=None, type="ok",
                               default=None, custom_buttons=None,
                               custom_icon=None, expanded=False):
diff --git a/pyanaconda/text.py b/pyanaconda/text.py
index 89c858d..9ecfcb9 100644
--- a/pyanaconda/text.py
+++ b/pyanaconda/text.py
@@ -379,14 +379,6 @@ class InstallInterface(InstallInterfaceBase):
         self.messageWindow(_("Error"),
                            _("Repository editing is not available in text mode."))
 
-    def entryWindow(self, title, text, prompt, entrylength = None):
-        (res, value) = EntryWindow(self.screen, title, text, [prompt])
-        if res == "cancel":
-            return None
-        r = value[0]
-        r.strip()
-        return r
-
     def getLuksPassphrase(self, passphrase = "", preexist = False):
         w = LuksPassphraseWindow(self.screen, passphrase = passphrase,
                                  preexist = preexist)
-- 
1.7.3.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux