From ddec7f64a92f4705d713dcf23754a68e7dd1bcd3 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Mon, 23 Jan 2006 09:26:58 +0100 Subject: * Fixed some spacings * Wording: "No updates available" -> "Your system is up-to-date" * Wording: starting header - "Available Updates" -> "Install software updates" * Wording: "_Install Updates" -> "_Install". the former one was just too long, espcially in translations * If there are no availabe updates: - unset sensitive treeview_update - set default to button "cancel" - hide label_downsize Else: - set default to button "install" --- UpdateManager/UpdateManager.py | 13 ++++++++++--- data/UpdateManager.glade | 13 ++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 7f832c06..17cdcbd1 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -387,12 +387,20 @@ class UpdateManager(SimpleGladeApp): def update_count(self): if len(self.packages) == 0: - text_header= _("No updates available") + text_header= ""+_("Your system is up-to-date")+"" text_download = "" + self.expander_details.set_sensitive(False) + self.treeview_update.set_sensitive(False) + self.label_downsize.hide() + self.button_cancel.grab_default() else: - text_header = gettext.ngettext("You can install one update", "You can install %s updates" % len(self.packages), len(self.packages)) + text_header = ""+gettext.ngettext("You can install one update", "You can install %s updates" % len(self.packages), len(self.packages))+"" text_download = _("Download size: %s" % apt_pkg.SizeToStr(self.dl_size)) + self.expander_details.set_sensitive(True) + self.treeview_update.set_sensitive(False) + self.label_downsize.show() + self.button_install.grab_default() self.label_header.set_markup(text_header) self.label_downsize.set_markup(text_download) @@ -665,7 +673,6 @@ class UpdateManager(SimpleGladeApp): text = "%s\n\n%s" % (_("Your system is up-to-date"), _("There are no updates available.")) self.label_header.set_markup(text) - self.store.append([False, _("Your system is up-to-date!"), None, None, None, None, None]) # make sure no install is possible self.button_install.set_sensitive(False) self.textview_changes.get_buffer().set_text("") diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index 80f82a12..c9b50999 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -26,7 +26,7 @@ 6 True False - 12 + 6 @@ -37,7 +37,6 @@ - 6 True False 12 @@ -67,7 +66,7 @@ True - <big><b>Available Updates</b></big> + <big><b>Install software updates</b></big> True True GTK_JUSTIFY_LEFT @@ -251,7 +250,6 @@ - True False False @@ -753,7 +751,7 @@ True - _Install Updates + _Install True False GTK_JUSTIFY_LEFT @@ -953,13 +951,13 @@ Need to get the changes from the central server GDK_GRAVITY_NORTH_WEST True False - True + False True False - 0 + 6 @@ -1002,6 +1000,7 @@ Need to get the changes from the central server + 6 True True GTK_POLICY_AUTOMATIC -- cgit v1.2.3 From 32a8743c07e44783af67f74f494d57e38ece3e6c Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Mon, 23 Jan 2006 09:32:27 +0100 Subject: * Fixed some spacing and alignments * Set the current step to bold - I cannot see any interace changes. perhaps this issue is gone with the changed alignments * Use italic style in the current command label --- DistUpgrade/DistUpgrade.glade | 675 ++++++++++++++++++++------------------ DistUpgrade/DistUpgradeViewGtk.py | 16 +- 2 files changed, 363 insertions(+), 328 deletions(-) diff --git a/DistUpgrade/DistUpgrade.glade b/DistUpgrade/DistUpgrade.glade index ad28aabc..d04f8623 100644 --- a/DistUpgrade/DistUpgrade.glade +++ b/DistUpgrade/DistUpgrade.glade @@ -6,7 +6,7 @@ 6 True - Upgrade Ubuntu + Upgrading Ubuntu GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -21,145 +21,316 @@ False - - 6 + True False - 6 + 12 - + + 6 True - <span weight="bold" size="x-large">Upgrading Ubuntu</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 12 - 12 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - + False + 12 - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 24 - 12 - 12 + + + True + <span weight="bold" size="x-large">Upgrading Ubuntu</span> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + - + True - 4 - 2 False - 6 - 0 + 0 - - 18 - 18 + True + + False + False + GTK_JUSTIFY_LEFT + False + False 0.5 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 - 0 - 1 - 0 - 1 + 0 + False + False - - 18 - 18 + True - 0.5 - 0.5 - 0 - 0 - - - 0 - 1 - 1 - 2 - fill - - + 4 + 2 + False + 6 + 6 - - - 18 - 18 - True - 0.5 - 0.5 - 0 - 0 + + + 18 + 18 + True + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + 18 + 18 + True + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + 18 + 18 + True + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + True + Preparing upgrade + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 0 + 1 + expand|shrink|fill + + + + + + + True + Upgrading software channels + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 1 + 2 + expand|shrink|fill + + + + + + + True + Upgrading the system + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 2 + 3 + expand|shrink|fill + + + + + + + True + Cleaning up + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 1 + 2 + 3 + 4 + expand|shrink|fill + + + + + + + 18 + 18 + True + 0.5 + 0.5 + 0 + 0 + + + 0 + 1 + 0 + 1 + fill + + - 0 - 1 - 2 - 3 - fill + 0 + True + True + + + 0 + True + True + + + + + + True + False + 4 - - 18 - 18 + + 350 True - 0.5 - 0.5 - 0 - 0 + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + + PANGO_ELLIPSIZE_NONE - 0 - 1 - 3 - 4 - fill + 0 + False + False - + True - Analyzing the system + False False GTK_JUSTIFY_LEFT - False + True False 0 0.5 @@ -171,23 +342,19 @@ 0 - 1 - 2 - 0 - 1 - expand|shrink|fill - + 0 + False + False - - True - Updating repository information + + False False GTK_JUSTIFY_LEFT - False + True False 0 0.5 @@ -199,53 +366,72 @@ 0 - 1 - 2 - 1 - 2 - expand|shrink|fill - + 0 + False + False + + + 0 + True + True + + + + + + True + True + 0 - + True - Performing the upgrade - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + 0 + + + + True + create_terminal + 0 + 0 + Tue, 06 Dec 2005 20:03:08 GMT + + + 0 + True + True + + + + + + True + GTK_UPDATE_CONTINUOUS + False + 0 0 0 0 0 0 + + + 0 + False + True + + - - 1 - 2 - 2 - 3 - expand|shrink|fill - - - + True - Post upgrade stuff + Terminal False False GTK_JUSTIFY_LEFT False False - 0 + 0.5 0.5 0 0 @@ -255,15 +441,15 @@ 0 - 1 - 2 - 3 - 4 - expand|shrink|fill - + label_item + + 0 + True + True + @@ -274,195 +460,34 @@ - + + 6 True - 0 - 0.5 - GTK_SHADOW_NONE + GTK_BUTTONBOX_END + 6 - + True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 12 - - - - True - False - 6 - - - - True - - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - 350 - True - GTK_PROGRESS_LEFT_TO_RIGHT - 0 - 0.10000000149 - - PANGO_ELLIPSIZE_NONE - - - 0 - False - False - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - True - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - create_terminal - 0 - 0 - Tue, 06 Dec 2005 20:03:08 GMT - - - 0 - True - True - - - - - - True - GTK_UPDATE_CONTINUOUS - False - 0 0 0 0 0 0 - - - 0 - False - True - - - - - - - - True - Terminal - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True - + True - <b>Current Step</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + True + True + gtk-media-pause + True + GTK_RELIEF_NORMAL + True - - label_item - diff --git a/DistUpgrade/DistUpgradeViewGtk.py b/DistUpgrade/DistUpgradeViewGtk.py index c39efbe6..4fc813bc 100644 --- a/DistUpgrade/DistUpgradeViewGtk.py +++ b/DistUpgrade/DistUpgradeViewGtk.py @@ -170,6 +170,16 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp): self.treeview_details.append_column(column) self.treeview_details.set_model(self.details_list) self.vscrollbar_terminal.set_adjustment(self._term.get_adjustment()) + # Use italic style in the status labels + + attrlist=pango.AttrList() + attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1) + attrlist.insert(attr) + + + self.label_status.set_property("attributes", attrlist) + self.label_extra_status.set_property("attributes", attrlist) + #self.label_status_extra.set_property("attributes", pango.AttrStyle(pango.STYLE_ITALIC, 0, -1)) def create_terminal(self, arg1,arg2,arg3,arg4): " helper to create a vte terminal " @@ -183,7 +193,7 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp): def getOpCacheProgress(self): return self._opCacheProgress def updateStatus(self, msg): - self.label_status.set_markup("%s" % msg) + self.label_status.set_text("%s" % msg) def setStep(self, step): # first update the "last" step as completed size = gtk.ICON_SIZE_MENU @@ -196,9 +206,9 @@ class GtkDistUpgradeView(DistUpgradeView,SimpleGladeApp): image = getattr(self,"image_step%i" % step) label = getattr(self,"label_step%i" % step) image.set_from_stock(gtk.STOCK_YES, size) + attr = pango.AttrWeight(pango.WEIGHT_BOLD, 0, -1) # we can't make it bold here without layout changes in the view :( - #attr = pango.AttrWeight(pango.WEIGHT_BOLD, 0, -1) - attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1) + #attr = pango.AttrStyle(pango.STYLE_ITALIC, 0, -1) attrlist.insert(attr) label.set_property("attributes",attrlist) -- cgit v1.2.3