diff options
author | Mike Fulbright <msf@redhat.com> | 2001-07-02 20:56:38 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2001-07-02 20:56:38 +0000 |
commit | 985db75db893d897d72a793fff6fa83a8a52a93f (patch) | |
tree | fafae6275e0d7faa34ac154f3f9e2b958e4f7311 /gui.py | |
parent | 8cedce028a159eefb9a99c758b7db57ba016420f (diff) | |
download | anaconda-985db75db893d897d72a793fff6fa83a8a52a93f.tar.gz anaconda-985db75db893d897d72a793fff6fa83a8a52a93f.tar.xz anaconda-985db75db893d897d72a793fff6fa83a8a52a93f.zip |
Fix yes/no dialog to actually work in text mode, fix GUI messageWindow to return a valid boolean value for yes/no dialog. Also fixup calls to messageWindow appropriately.
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -233,7 +233,7 @@ class MessageWindow: self.rc = button def questionquit (self, button): - self.rc = button + self.rc = not button def getrc (self): return self.rc @@ -258,6 +258,11 @@ class MessageWindow: win.keyboard_grab(0) self.window.show_all () self.rc = self.window.run () + + # invert result from yes/no dialog for some reason + if type == "yesno": + self.rc = not self.rc + win.keyboard_ungrab() class InstallInterface: @@ -285,7 +290,8 @@ class InstallInterface: return self.ppw def messageWindow(self, title, text, type = "ok"): - return MessageWindow (title, text, type) + rc = MessageWindow (title, text, type).getrc() + return rc def exceptionWindow(self, title, text): print text |