summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2006-08-04 03:13:19 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2006-08-04 03:13:19 +0000
commita57c745b85a6d65b71dfec9324111fa9b950f156 (patch)
tree2734be53fee8a25670da66e6174a3bdaae2a4426 /src/installer
parentMore cleanups (diff)
downloadgentoo-a57c745b85a6d65b71dfec9324111fa9b950f156.tar.gz
gentoo-a57c745b85a6d65b71dfec9324111fa9b950f156.tar.bz2
gentoo-a57c745b85a6d65b71dfec9324111fa9b950f156.zip
src/fe/gtk/RunInstall.py, src/fe/gtk/gtkfe.py:
ask user if they really want to exit with X in corner clicked
Diffstat (limited to 'src/installer')
-rw-r--r--src/installer/src/fe/gtk/ChangeLog8
-rw-r--r--src/installer/src/fe/gtk/RunInstall.py8
-rw-r--r--src/installer/src/fe/gtk/gtkfe.py8
3 files changed, 22 insertions, 2 deletions
diff --git a/src/installer/src/fe/gtk/ChangeLog b/src/installer/src/fe/gtk/ChangeLog
index 9b6a07930a..b66d7e8df9 100644
--- a/src/installer/src/fe/gtk/ChangeLog
+++ b/src/installer/src/fe/gtk/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for Gentoo Linux Installer
# Copyright 2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/installer/src/fe/gtk/ChangeLog,v 1.228 2006/06/24 21:38:18 agaffney Exp $
+# $Header: /var/cvsroot/gentoo/src/installer/src/fe/gtk/ChangeLog,v 1.229 2006/08/04 03:13:19 agaffney Exp $
+
+ 3 Aug 2006; Andrew Gaffney <agaffney@gentoo.org>
+ src/fe/gtk/RunInstall.py, src/fe/gtk/gtkfe.py:
+ ask user if they really want to exit with X in corner clicked
+
+*GLI-gtk-0.4 (31 Jul 2006)
24 Jun 2006; Andrew Gaffney <agaffney@gentoo.org>
src/fe/gtk/Kernel.py:
diff --git a/src/installer/src/fe/gtk/RunInstall.py b/src/installer/src/fe/gtk/RunInstall.py
index f4704e271c..845aea8789 100644
--- a/src/installer/src/fe/gtk/RunInstall.py
+++ b/src/installer/src/fe/gtk/RunInstall.py
@@ -234,6 +234,14 @@ class RunInstall(gtk.Window):
# print "delete event occurred"
# Change TRUE to FALSE and the main window will be destroyed with
# a "delete_event".
+ if not self.install_done and not self.install_fail:
+ msgdlg = gtk.MessageDialog(parent=self, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Do you really want to exit the installer before the install is complete?"))
+ resp = msgdlg.run()
+ msgdlg.destroy()
+ if resp == gtk.RESPONSE_YES:
+ return False
+ else:
+ return True
return False
# Destroy callback
diff --git a/src/installer/src/fe/gtk/gtkfe.py b/src/installer/src/fe/gtk/gtkfe.py
index 8f2376a588..74d926e270 100644
--- a/src/installer/src/fe/gtk/gtkfe.py
+++ b/src/installer/src/fe/gtk/gtkfe.py
@@ -331,7 +331,13 @@ class Installer:
errdlg.destroy()
def delete_event(self, widget, event, data=None):
- return False
+ msgdlg = gtk.MessageDialog(parent=self.window, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_YES_NO, message_format=_("Do you really want to exit the installer before the install is complete?"))
+ resp = msgdlg.run()
+ msgdlg.destroy()
+ if resp == gtk.RESPONSE_YES:
+ return False
+ else:
+ return True
def destroy(self, widget, data=None):
gtk.main_quit()