diff options
author | Mike Fulbright <msf@redhat.com> | 2002-06-25 21:15:10 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2002-06-25 21:15:10 +0000 |
commit | 32bcef61b254cf40b922fffce03faf1d0b05b737 (patch) | |
tree | 4d4d8fc93d47aee69a848d901a106d3a98cec1f9 /gui.py | |
parent | 63d6205907feb7cc771abcb546e68c82223ed21e (diff) | |
download | anaconda-32bcef61b254cf40b922fffce03faf1d0b05b737.tar.gz anaconda-32bcef61b254cf40b922fffce03faf1d0b05b737.tar.xz anaconda-32bcef61b254cf40b922fffce03faf1d0b05b737.zip |
add concept of custom icon
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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): |