From e759f493056a1fbe9094181faa970f7fffecdb0b Mon Sep 17 00:00:00 2001 From: "glatzor@ubuntu.com" <> Date: Tue, 12 Sep 2006 12:53:50 +0200 Subject: * fix the visual change of steps, if some steps are hidden * use the apply and cancel icons instead of yes/no for the status of a task --- DistUpgrade/DistUpgradeViewGtk.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'DistUpgrade') diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index a61bbcaa..5a3779e9 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -319,6 +319,7 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): gtk.window_set_default_icon(icons.load_icon("update-manager", 32, 0)) SimpleGladeApp.__init__(self, gladedir+"/DistUpgrade.glade", None, domain="update-manager") + self.last_step = 0 # keep a record of the latest step # we dont use this currently #self.window_main.set_keep_above(True) self.window_main.realize() @@ -409,25 +410,26 @@ class DistUpgradeViewGtk(DistUpgradeView,SimpleGladeApp): label.hide() def abort(self): size = gtk.ICON_SIZE_MENU - step = self.step - image = getattr(self,"image_step%i" % step) - arrow = getattr(self,"arrow_step%i" % step) - image.set_from_stock(gtk.STOCK_NO, size) - image.show() - arrow.hide() + step = self.last_step + if step > 0: + image = getattr(self,"image_step%i" % step) + arrow = getattr(self,"arrow_step%i" % step) + image.set_from_stock(gtk.STOCK_CANCEL, size) + image.show() + arrow.hide() def setStep(self, step): - self.step = step # first update the "last" step as completed size = gtk.ICON_SIZE_MENU attrlist=pango.AttrList() - if step > 1: - image = getattr(self,"image_step%i" % (step-1)) - label = getattr(self,"label_step%i" % (step-1)) - arrow = getattr(self,"arrow_step%i" % (step-1)) + if self.last_step: + image = getattr(self,"image_step%i" % self.last_step) + label = getattr(self,"label_step%i" % self.last_step) + arrow = getattr(self,"arrow_step%i" % self.last_step) label.set_property("attributes",attrlist) - image.set_from_stock(gtk.STOCK_YES, size) + image.set_from_stock(gtk.STOCK_APPLY, size) image.show() arrow.hide() + self.last_step = step # show the an arrow for the current step and make the label bold image = getattr(self,"image_step%i" % step) label = getattr(self,"label_step%i" % step) -- cgit v1.2.3 From 3f5e7c9dff677fd1c52e415c1491d4c63939ebcf Mon Sep 17 00:00:00 2001 From: "glatzor@ubuntu.com" <> Date: Tue, 12 Sep 2006 13:54:33 +0200 Subject: * Rename the main window to "Distribution Upgrade" - that is also the name we refer to in update-manager and it fits to the acronym dist-upgrade --- DistUpgrade/DistUpgrade.glade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DistUpgrade') diff --git a/DistUpgrade/DistUpgrade.glade b/DistUpgrade/DistUpgrade.glade index 598e12be..615f698c 100644 --- a/DistUpgrade/DistUpgrade.glade +++ b/DistUpgrade/DistUpgrade.glade @@ -6,7 +6,7 @@ 6 True - System Upgrade + Distribution Upgrade GTK_WINDOW_TOPLEVEL GTK_WIN_POS_CENTER False -- cgit v1.2.3