summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rwxr-xr-xgui.py9
-rw-r--r--text.py12
3 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index cc0321222..1d975632f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/gui.py b/gui.py
index e393b2b3d..1b1671195 100755
--- a/gui.py
+++ b/gui.py
@@ -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:
diff --git a/text.py b/text.py
index 118bdf3a7..c3c4d0072 100644
--- a/text.py
+++ b/text.py
@@ -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)