diff options
author | Jeremy Katz <katzj@redhat.com> | 2008-03-26 16:14:19 -0400 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-03-26 16:42:01 -0400 |
commit | 8d923fe3196e059263ae41da620f086471b8e28f (patch) | |
tree | 3ab3855f1fbdf929ff56114a5e18bed8b7d921e4 /gui.py | |
parent | c8f3b9d451d28a3c41125c6d900ecc79aed7f41b (diff) | |
download | anaconda-8d923fe3196e059263ae41da620f086471b8e28f.tar.gz anaconda-8d923fe3196e059263ae41da620f086471b8e28f.tar.xz anaconda-8d923fe3196e059263ae41da620f086471b8e28f.zip |
Add confirmation of closing the installer window (#437772)
(Note: the string isn't marked for translation right now due to string freeze
but it's a very strange side error case, so should be okay)
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1382,6 +1382,17 @@ class InstallControlWindow: gtk.main_quit() os._exit(0) + def _doExitConfirm (self, win = None, *args): + # FIXME: translate the string + win = MessageWindow(_("Exit installer"), + ("Are you sure you wish to exit the installation?"), + type="custom", custom_icon="question", + custom_buttons = [_("Cancel"), _("_Exit installer")], + parent = win) + if win.getrc() == 0: + return True + self._doExit() + def createWidgets (self): self.window.set_title(_("%s Installer") %(productName,)) @@ -1409,7 +1420,7 @@ class InstallControlWindow: "on_backButton_clicked": self.prevClicked, "on_debugButton_clicked": self.debugClicked, "on_mainWindow_key_release_event": self.keyRelease, - "on_mainWindow_delete_event": self._doExit, } + "on_mainWindow_delete_event": self._doExitConfirm, } self.mainxml.signal_autoconnect(sigs) def loadGlade(self): |