summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-07-02 20:56:38 +0000
committerMike Fulbright <msf@redhat.com>2001-07-02 20:56:38 +0000
commit985db75db893d897d72a793fff6fa83a8a52a93f (patch)
treefafae6275e0d7faa34ac154f3f9e2b958e4f7311 /gui.py
parent8cedce028a159eefb9a99c758b7db57ba016420f (diff)
downloadanaconda-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-xgui.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/gui.py b/gui.py
index 3176acd0b..f8a840356 100755
--- a/gui.py
+++ b/gui.py
@@ -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