summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2002-05-31 02:14:29 +0000
committerMatt Wilson <msw@redhat.com>2002-05-31 02:14:29 +0000
commitaf35347b7d9a619af171f6e2938bf7bbe0f4e495 (patch)
tree2a693b259c628caa7538bef476f9c74e2a12b59a /gui.py
parent13f6b957be5023a3b35877011deb8b6b88da80b8 (diff)
downloadanaconda-af35347b7d9a619af171f6e2938bf7bbe0f4e495.tar.gz
anaconda-af35347b7d9a619af171f6e2938bf7bbe0f4e495.tar.xz
anaconda-af35347b7d9a619af171f6e2938bf7bbe0f4e495.zip
you have to be very careful about the order in which you set the defaults, the addFrame was blowing away the default
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/gui.py b/gui.py
index 45908bccc..abf36887a 100755
--- a/gui.py
+++ b/gui.py
@@ -148,6 +148,7 @@ def addFrame(dialog):
frame = gtk.Frame()
frame.set_shadow_type(gtk.SHADOW_OUT)
frame.add(contents)
+ frame.show()
dialog.add(frame)
class WaitWindow:
@@ -295,19 +296,18 @@ class MessageWindow:
widget = dialog.add_button(button, rid)
rid = rid + 1
- dialog.set_default_response(len(custom_buttons)-1)
-# widget.set_flags(gtk.CAN_DEFAULT)
-# widget.grab_default()
+ defaultchoice = rid - 1
else:
if default == "no":
- dialog.set_default_response(0)
+ defaultchoice = 0
elif default == "yes" or default == "ok":
- dialog.set_default_response(1)
+ defaultchoice = 1
else:
- dialog.set_default_response(0)
+ defaultchoice = 0
addFrame(dialog)
dialog.set_position (gtk.WIN_POS_CENTER)
+ dialog.set_default_response(defaultchoice)
dialog.show_all ()
rc = dialog.run()