diff options
author | Jeremy Katz <katzj@redhat.com> | 2008-03-27 15:36:03 -0400 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-03-27 15:36:03 -0400 |
commit | f71d691f808e0aeaaceb1cec5ae216e9cc27b8df (patch) | |
tree | 38b6346a0b4bdfb35dbd28a32eca22afa57a10b2 /gui.py | |
parent | 0de6e488fc0919d97d094f65d91da0f66c02b04e (diff) | |
download | anaconda-f71d691f808e0aeaaceb1cec5ae216e9cc27b8df.tar.gz anaconda-f71d691f808e0aeaaceb1cec5ae216e9cc27b8df.tar.xz anaconda-f71d691f808e0aeaaceb1cec5ae216e9cc27b8df.zip |
Add support for saving the exception to a local directory for live installs
If you're doing a live install, you often won't have removable media inserted
but you _can_ just save the exception somewhere and then report it. So let's
take advantage of that. Not implemented for text mode as text-mode live
installs aren't that relevant
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -732,9 +732,13 @@ class SaveExceptionWindow: self.diskCombo = exnxml.get_widget("diskCombo") self.remoteButton = exnxml.get_widget("remoteButton") self.remoteBox = exnxml.get_widget("remoteHBox") + self.localButton = exnxml.get_widget("localButton") + self.localChooser = exnxml.get_widget("localChooser") self.win = exnxml.get_widget("saveDialog") - self.diskButton.connect("toggled", self.diskButton_changed) + self.diskButton.connect("toggled", self.radio_changed) + self.remoteButton.connect("toggled", self.radio_changed) + self.localButton.connect("toggled", self.radio_changed) cell = gtk.CellRendererText() self.diskCombo.pack_start(cell, True) @@ -744,7 +748,11 @@ class SaveExceptionWindow: dests = anaconda.id.diskset.exceptionDisks(anaconda) - if len(dests) > 0: + if flags.livecdInstall: + exnxml.get_widget("diskBox").hide() + exnxml.get_widget("localBox").show() + self.localButton.set_active(True) + elif len(dests) > 0: for d in dests: iter = store.append(None) store[iter] = (d[0], "/dev/%s - %s" % (d[0], d[1])) @@ -758,12 +766,13 @@ class SaveExceptionWindow: self.remoteBox.set_sensitive(True) addFrame(self.win) - self.win.show_all() + self.win.show() self.window = self.win - def diskButton_changed(self, args): + def radio_changed(self, args): self.diskCombo.set_sensitive(self.diskButton.get_active()) - self.remoteBox.set_sensitive(not self.diskButton.get_active()) + self.remoteBox.set_sensitive(self.remoteButton.get_active()) + self.localChooser.set_sensitive(self.localButton.get_active()) def getrc(self): if self.rc == gtk.RESPONSE_OK: @@ -778,6 +787,8 @@ class SaveExceptionWindow: return None return self.diskCombo.get_model()[active][0] + elif self.saveToLocal(): + return self.localChooser.get_filename() else: return map(lambda e: e.get_text(), [self.hostEntry, self.destEntry, self.usernameEntry, self.passwordEntry]) @@ -790,6 +801,9 @@ class SaveExceptionWindow: def saveToDisk(self): return self.diskButton.get_active() + def saveToLocal(self): + return self.localButton.get_active() + class MessageWindow: def getrc (self): return self.rc |