summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-06-25 21:15:10 +0000
committerMike Fulbright <msf@redhat.com>2002-06-25 21:15:10 +0000
commit32bcef61b254cf40b922fffce03faf1d0b05b737 (patch)
tree4d4d8fc93d47aee69a848d901a106d3a98cec1f9 /gui.py
parent63d6205907feb7cc771abcb546e68c82223ed21e (diff)
downloadanaconda-32bcef61b254cf40b922fffce03faf1d0b05b737.tar.gz
anaconda-32bcef61b254cf40b922fffce03faf1d0b05b737.tar.xz
anaconda-32bcef61b254cf40b922fffce03faf1d0b05b737.zip
add concept of custom icon
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/gui.py b/gui.py
index 9e618d13e..63f4c58d9 100755
--- a/gui.py
+++ b/gui.py
@@ -287,7 +287,7 @@ class MessageWindow:
def getrc (self):
return self.rc
- def __init__ (self, title, text, type="ok", default=None, custom_buttons=None):
+ def __init__ (self, title, text, type="ok", default=None, custom_buttons=None, custom_icon=None):
if flags.autostep:
print title, text, type
self.rc = 1
@@ -309,7 +309,13 @@ class MessageWindow:
elif type == 'custom':
docustom = 1
buttons = gtk.BUTTONS_NONE
- style = gtk.MESSAGE_QUESTION
+
+ if custom_icon == "warning":
+ style = gtk.MESSAGE_WARNING
+ elif custom_icon == "question":
+ style = gtk.MESSAGE_QUESTION
+ else:
+ style = gtk.MESSAGE_QUESTION
dialog = gtk.MessageDialog(mainWindow, 0, style, buttons, text)
@@ -376,8 +382,10 @@ class InstallInterface:
self.ppw.setSizes (total, totalSize)
return self.ppw
- def messageWindow(self, title, text, type="ok", default = None, custom_buttons=None):
- rc = MessageWindow (title, text, type, default, custom_buttons).getrc()
+ def messageWindow(self, title, text, type="ok", default = None,
+ custom_buttons=None, custom_icon=None):
+ rc = MessageWindow (title, text, type, default,
+ custom_buttons, custom_icon).getrc()
return rc
def exceptionWindow(self, title, text):