From 8abb01fb328c6e0c3da3263af149934b02949b8a Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Sat, 18 Feb 2006 16:06:37 +0100 Subject: * Do not disable the update dialog during downloading of the changelog * Show step 5 "Restarting the system" in the ui, since users asked me, how and when they should reboot. this should provide a better picture of the upgrade process * Fixed the parent of the change media dialog * Converted the abort DistUpgrade dialog to a nice glade dialog * Disabled the abortion of the DistUpgrade. it is currently not supported. --- DistUpgrade/DistUpgradeViewGtk.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'DistUpgrade/DistUpgradeViewGtk.py') diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index 6013200b..c36d8dac 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -74,7 +74,7 @@ class GtkFetchProgressAdapter(apt.progress.FetchProgress): def mediaChange(self, medium, drive): #print "mediaChange %s %s" % (medium, drive) msg = _("Please insert '%s' into the drive '%s'" % (medium,drive)) - dialog = gtk.MessageDialog(parent=self.main, + dialog = gtk.MessageDialog(parent=self.window_main, flags=gtk.DIALOG_MODAL, type=gtk.MESSAGE_QUESTION, buttons=gtk.BUTTONS_OK_CANCEL) @@ -182,9 +182,13 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): # FIXME: i18n must be somewhere relative do this dir bindtextdomain("update-manager",os.path.join(os.getcwd(),"mo")) + icons = gtk.icon_theme_get_default() + gtk.window_set_default_icon(icons.load_icon("update-manager", 32, 0)) SimpleGladeApp.__init__(self, "DistUpgrade.glade", None, domain="update-manager") self.window_main.set_keep_above(True) + self.window_main.realize() + self.window_main.window.set_functions(gtk.gdk.FUNC_MOVE) self._opCacheProgress = GtkOpProgress(self.progressbar_cache) self._fetchProgress = GtkFetchProgressAdapter(self) self._installProgress = GtkInstallProgressAdapter(self) @@ -328,6 +332,8 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): def confirmRestart(self): self.dialog_restart.set_transient_for(self.window_main) + self.dialog_restart.realize() + self.dialog_restart.window.set_functions(gtk.gdk.FUNC_MOVE) res = self.dialog_restart.run() self.dialog_restart.hide() if res == gtk.RESPONSE_YES: @@ -335,14 +341,14 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): 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 + self.dialog_cancel.set_transient_for(self.window_main) + self.dialog_cancel.realize() + self.dialog_cancel.window.set_functions(gtk.gdk.FUNC_MOVE) + res = self.dialog_cancel.run() + self.dialog_cancel.hide() + if res == gtk.RESPONSE_CANCEL: + self.destroy() + return True if __name__ == "__main__": view = GtkDistUpgradeView() -- cgit v1.2.3