diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | gui.py | 9 | ||||
-rw-r--r-- | text.py | 12 |
3 files changed, 23 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2006-02-14 Chris Lumens <clumens@redhat.com> + + * gui.py (ExceptionWindow.__init__): Remove remote button if there's + no network. + * text.py (ExceptionWindow.__init__): Likewise. + 2006-02-14 Jeremy Katz <katzj@redhat.com> * yuminstall.py (YumBackend.selectConditionalPackages): Right @@ -41,6 +41,7 @@ import warnings from language import expandLangs from flags import flags from constants import * +from vnc import hasActiveNetDev import floppy from rhpl.translate import _, N_ @@ -600,12 +601,18 @@ class ExceptionWindow: textbuf = gtk.TextBuffer() textbuf.set_text(shortTraceback) - # Remove the debug button if we don't need it. + # Remove the floppy button if we don't need it. if not floppy.hasFloppyDevice() and not DEBUG: buttonBox = exnxml.get_widget("buttonBox") floppyButton = exnxml.get_widget("floppyButton") buttonBox.remove(floppyButton) + # Remove the remote button if there's no network. + if not hasActiveNetDev() and not DEBUG: + buttonBox = exnxml.get_widget("buttonBox") + remoteButton = exnxml.get_widget("remoteButton") + buttonBox.remove(remoteButton) + # If there's an anacdump.txt file, add it to the lower view in the # expander. If not, remove the expander. if longTracebackFile: @@ -28,6 +28,7 @@ from language import expandLangs from flags import flags from constants_text import * from constants import * +from vnc import hasActiveNetDev import floppy from rhpl.translate import _, cat, N_ @@ -143,10 +144,15 @@ class ExceptionWindow: self.text = "%s\n\n" % shortTraceback self.screen = screen + self.buttons=[TEXT_OK_BUTTON] + if floppy.hasFloppyDevice() == True or DEBUG: - self.buttons=[TEXT_OK_BUTTON, _("Save"), _("Remote"), _("Debug")] - else: - self.buttons=[TEXT_OK_BUTTON, _("Remote"), _("Debug")] + self.buttons.append(_("Save")) + + if hasActiveNetDev() or DEBUG: + self.buttons.append(_("Remote")) + + self.buttons.append(_("Debug")) def run(self): log.info ("in run, screen = %s" % self.screen) |