summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeViewGtk.py
diff options
context:
space:
mode:
authorSebastian Heinlein <sebastian.heinlein@web.de>2006-02-18 16:06:37 +0100
committerSebastian Heinlein <sebastian.heinlein@web.de>2006-02-18 16:06:37 +0100
commit8abb01fb328c6e0c3da3263af149934b02949b8a (patch)
tree397fd4a832636b0318aa60274b904780f520897b /DistUpgrade/DistUpgradeViewGtk.py
parentcf64db47c8e2192041df35c6dd056fe6ae91cacc (diff)
downloadpython-apt-8abb01fb328c6e0c3da3263af149934b02949b8a.tar.gz
* 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.
Diffstat (limited to 'DistUpgrade/DistUpgradeViewGtk.py')
-rw-r--r--DistUpgrade/DistUpgradeViewGtk.py24
1 files changed, 15 insertions, 9 deletions
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()