[PATCH 04/12] Remove SaveExceptionWindow and MainExceptionWindow. meh has those now.

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

 



---
 gui.py |  160 ----------------------------------------------------------------
 1 files changed, 0 insertions(+), 160 deletions(-)

diff --git a/gui.py b/gui.py
index 3d75ae1..03c5af4 100755
--- a/gui.py
+++ b/gui.py
@@ -735,124 +735,6 @@ class PassphraseEntryWindow:
     def destroy(self):
         self.win.destroy()
 
-class SaveExceptionWindow:
-    def __init__(self, anaconda, longTracebackFile=None, screen=None):
-        exnxml = gtk.glade.XML(findGladeFile("exnSave.glade"), domain="anaconda")
-
-        self.bugzillaNameEntry = exnxml.get_widget("bugzillaNameEntry")
-        self.bugzillaPasswordEntry = exnxml.get_widget("bugzillaPasswordEntry")
-        self.bugDesc = exnxml.get_widget("bugDesc")
-
-        self.scpNameEntry = exnxml.get_widget("scpNameEntry")
-        self.scpPasswordEntry = exnxml.get_widget("scpPasswordEntry")
-        self.scpHostEntry = exnxml.get_widget("scpHostEntry")
-        self.scpDestEntry = exnxml.get_widget("scpDestEntry")
-
-        self.notebook = exnxml.get_widget("destNotebook")
-        self.destCombo = exnxml.get_widget("destCombo")
-
-        self.diskCombo = exnxml.get_widget("diskCombo")
-        self.localChooser = exnxml.get_widget("localChooser")
-        self.win = exnxml.get_widget("saveDialog")
-
-        self.destCombo.connect("changed", self.combo_changed)
-
-        self.destCombo.insert_text(2, _("Bugzilla (%s)") % bugUrl)
-
-        cell = gtk.CellRendererText()
-        self.diskCombo.pack_start(cell, True)
-        self.diskCombo.set_attributes(cell, text=1)
-
-        store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
-
-        dests = []
-        if anaconda.id.storage.devicetree.populated:
-            try:
-                dests = anaconda.id.storage.exceptionDisks()
-            except Exception as e:
-                log.error("Error when probing exception disks: %s" % e)
-        else:
-            log.info("Storage configuration unknown; not probing for "
-                     "exception disks")
-
-        if flags.livecdInstall:
-            self.destCombo.remove_text(0)
-            self.destCombo.set_active(0)
-            self.notebook.remove_page(0)
-            self.notebook.set_current_page(0)
-        elif len(dests) > 0:
-            for d in dests:
-                iter = store.append(None)
-                store[iter] = (d[0], "%s - %s" % (d[0], d[1]))
-
-            self.diskCombo.set_model(store)
-            self.diskCombo.set_active(0)
-            self.diskCombo.set_sensitive(True)
-
-            self.destCombo.remove_text(1)
-            self.destCombo.set_active(0)
-            self.notebook.remove_page(1)
-            self.notebook.set_current_page(0)
-        else:
-            iter = store.append(None)
-            store[iter] = (None, _("No devices found"))
-
-            self.diskCombo.set_model(store)
-            self.diskCombo.set_active(0)
-            self.diskCombo.set_sensitive(False)
-
-            self.destCombo.remove_text(1)
-            self.destCombo.set_active(1)
-            self.notebook.remove_page(1)
-            self.notebook.set_current_page(1)
-
-        addFrame(self.win)
-        self.win.show()
-        self.window = self.win
-
-    def combo_changed(self, args):
-        self.notebook.set_current_page(self.destCombo.get_active())
-
-    def getrc(self):
-        if self.rc == gtk.RESPONSE_OK:
-            return EXN_OK
-        elif self.rc == gtk.RESPONSE_CANCEL:
-            return EXN_CANCEL
-
-    def getDest(self):
-        if self.saveToDisk():
-            active = self.diskCombo.get_active()
-            if active < 0 or self.diskCombo.get_model()[active][0] is None:
-                return None
-
-            return self.diskCombo.get_model()[active][0]
-        elif self.saveToLocal():
-            return self.localChooser.get_filename()
-        elif self.saveToRemote():
-            return map(lambda e: e.get_text(), [self.scpNameEntry,
-                                                self.scpPasswordEntry,
-                                                self.scpHostEntry,
-                                                self.scpDestEntry])
-        else:
-            return map(lambda e: e.get_text(), [self.bugzillaNameEntry,
-                                                self.bugzillaPasswordEntry,
-                                                self.bugDesc])
-
-    def pop(self):
-        self.window.destroy()
-
-    def run(self):
-        self.rc = self.window.run ()
-
-    def saveToDisk(self):
-        return self.destCombo.get_active() == 0 and not flags.livecdInstall
-
-    def saveToLocal(self):
-        return self.destCombo.get_active() == 0 and flags.livecdInstall
-
-    def saveToRemote(self):
-        return self.destCombo.get_active() == 2
-
 class MessageWindow:
     def getrc (self):
         return self.rc
@@ -1065,48 +947,6 @@ class DetailedMessageWindow(MessageWindow):
         if run:
             self.run(destroyAfterRun)
 
-class MainExceptionWindow(DetailedMessageWindow):
-    def __init__ (self, shortTraceback, longTracebackFile=None, screen=None):
-        longText=None
-
-        if longTracebackFile:
-            try:
-                f = open(longTracebackFile)
-                longText = f.readlines()
-                f.close()
-            except:
-                pass
-
-        if flags.livecdInstall:
-            custom_buttons = ["gtk-save", _("Exit installer")]
-        else:
-            custom_buttons = [_("Debug"), "gtk-save", _("Exit installer")]
-
-        DetailedMessageWindow.__init__(self, _("Exception Occurred"),
-                                       exceptionText, longText=longText,
-                                       type="custom", run=False,
-                                       custom_buttons=custom_buttons,
-                                       custom_icon=findPixmap("exception.png"))
-
-    def getrc (self):
-        if flags.livecdInstall:
-            if self.rc == 0:
-                return EXN_SAVE
-            elif self.rc == 1:
-                return EXN_OK
-        else:
-            if self.rc == 0:
-                try:
-                    # switch to VC1 so we can debug
-                    isys.vtActivate (1)
-                except SystemError:
-                    pass
-                return EXN_DEBUG
-            elif self.rc == 1:
-                return EXN_SAVE
-            elif self.rc == 2:
-                return EXN_OK
-
 class EntryWindow(MessageWindow):
     def __init__ (self, title, text, prompt, entrylength = None):
         mainWindow = None
-- 
1.6.1.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