summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgrade.glade5
-rw-r--r--DistUpgrade/DistUpgradeControler.py3
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py10
3 files changed, 14 insertions, 4 deletions
diff --git a/DistUpgrade/DistUpgrade.glade b/DistUpgrade/DistUpgrade.glade
index d04f8623..7ad420da 100644
--- a/DistUpgrade/DistUpgrade.glade
+++ b/DistUpgrade/DistUpgrade.glade
@@ -19,6 +19,8 @@
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
+ <signal name="delete_event" handler="on_window_main_delete_event" last_modification_time="Mon, 23 Jan 2006 15:30:09 GMT"/>
+ <signal name="destroy_event" handler="on_window_main_destroy_event" last_modification_time="Mon, 23 Jan 2006 15:30:19 GMT"/>
<child>
<widget class="GtkVBox" id="vbox5">
@@ -382,7 +384,7 @@
<child>
<widget class="GtkExpander" id="expander_terminal">
<property name="can_focus">True</property>
- <property name="expanded">True</property>
+ <property name="expanded">False</property>
<property name="spacing">0</property>
<child>
@@ -462,7 +464,6 @@
<child>
<widget class="GtkHButtonBox" id="hbuttonbox2">
<property name="border_width">6</property>
- <property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">6</property>
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index e67009cf..bea1e40f 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -217,9 +217,8 @@ class DistUpgradeControler(object):
self._view.error(_("Error during commit"),
_("Some problem occured during the clean-up. "
"Please see the below message for more "
- "information. ",
+ "information. "),
"%s" % e)
-
self.cache.commit(fprogress,iprogress)
def askForReboot(self):
diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py
index b6ff38b2..a313ce4f 100644
--- a/DistUpgrade/DistUpgradeViewGtk.py
+++ b/DistUpgrade/DistUpgradeViewGtk.py
@@ -27,6 +27,7 @@ import gtk.glade
import vte
import gobject
import pango
+import sys
import apt
import apt_pkg
@@ -296,6 +297,15 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp):
return True
return False
+ def on_window_main_delete_event(self, widget, event):
+ #print "on_window_main_delete_event()"
+ summary = _("Are you sure you want cancel?")
+ msg = _("Canceling during a upgrade can leave the system in a "
+ "unstable state. It is strongly adviced to continue "
+ "the operation. ")
+ if self.askYesNoQuestion(summary, msg):
+ self.exit(1)
+ return True
if __name__ == "__main__":
view = GtkDistUpgradeView()