diff options
author | Matt Wilson <msw@redhat.com> | 2002-05-31 02:14:29 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2002-05-31 02:14:29 +0000 |
commit | af35347b7d9a619af171f6e2938bf7bbe0f4e495 (patch) | |
tree | 2a693b259c628caa7538bef476f9c74e2a12b59a | |
parent | 13f6b957be5023a3b35877011deb8b6b88da80b8 (diff) | |
download | anaconda-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
-rwxr-xr-x | gui.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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() |