From a72c2f3fdc0c659b1611ea99d933963d51182f92 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 16 Jan 2006 12:59:20 +0100 Subject: * HIGification (thanks to sebastian heinlein) --- UpdateManager/GtkProgress.py | 29 +- UpdateManager/UpdateManager.py | 16 +- data/UpdateManager.glade | 1022 ++++++++++++++++++++++------------------ debian/changelog | 13 + 4 files changed, 608 insertions(+), 472 deletions(-) diff --git a/UpdateManager/GtkProgress.py b/UpdateManager/GtkProgress.py index d12a108a..d25149e4 100644 --- a/UpdateManager/GtkProgress.py +++ b/UpdateManager/GtkProgress.py @@ -26,18 +26,23 @@ import apt import apt_pkg from gettext import gettext as _ -class GtkOpProgress(apt.progress.OpProgress): - def __init__(self, progressbar): - self._progressbar = progressbar - def update(self, percent): - self._progressbar.show() - self._progressbar.set_text(self.op) - self._progressbar.set_fraction(percent/100.0) - while gtk.events_pending(): - gtk.main_iteration() - def done(self): - self._progressbar.hide() - +class GtkOpProgress(apt.OpProgress): + def __init__(self, window,progressbar, parent): + self._parent = parent + self._window = window + self._progressbar = progressbar + window.set_transient_for(parent) + def update(self, percent): + #print percent + #print self.Op + #print self.SubOp + self._window.show() + self._progressbar.set_text(self.op) + self._progressbar.set_fraction(percent/100.0) + while gtk.events_pending(): + gtk.main_iteration() + def done(self): + self._window.hide() class GtkFetchProgress(apt.progress.FetchProgress): def __init__(self, parent, summary="", descr=""): diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index cc8e1f88..83a94df5 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -402,12 +402,18 @@ class UpdateManager(SimpleGladeApp): self.update_count() def update_count(self): - text = "%i (%s)" % (len(self.packages), - apt_pkg.SizeToStr(self.dl_size)) - self.label_num_updates.set_text(text) + text = _("Available updates\n\n" + "The are currently %s software updates availabe. The " + "size of the download is %s." % \ + (len(self.packages), apt_pkg.SizeToStr(self.dl_size))) + self.label_header.set_markup(text) def activate_details(self, expander, data): expanded = self.expander_details.get_expanded() + if expanded: + expander.set_label(_("Hide details")) + else: + expander.set_label(_("Show details")) self.gconfclient.set_bool("/apps/update-manager/show_details",expanded) if expanded: self.on_treeview_update_cursor_changed(self.treeview_update) @@ -820,7 +826,9 @@ class UpdateManager(SimpleGladeApp): d.destroy() sys.exit() - self.cache = MyCache(GtkProgress.GtkOpProgress(self.progressbar_cache)) + self.cache = MyCache(GtkProgress.GtkOpProgress(self.dialog_cacheprogress, + self.progressbar_cache, + self.window_main)) #apt_pkg.Config.Set("Debug::pkgPolicy","1") #self.depcache = apt_pkg.GetDepCache(self.cache) self.cache._depcache.ReadPinFile() diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index b6bde5ad..3a4d61f1 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -4,7 +4,6 @@ - 6 True Software Updates GTK_WINDOW_TOPLEVEL @@ -13,7 +12,7 @@ 600 True False - /usr/share/pixmaps/update-manager.png + update-manager.png True False False @@ -27,101 +26,57 @@ 6 True False - 6 + 12 - + 6 True False 12 - - True - /usr/share/pixmaps/update-manager-logo.png - 0.5 - 0 - 0 - 0 - - - 0 - False - False - - - - - + + 6 True - <big><b>Available Updates</b></big> - -The following packages are found to be upgradable. You can upgrade them by using the Install button. - True - True - GTK_JUSTIFY_LEFT - True - False - 0 - 0 - 10 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - 0 - False - True - - - - - - 0 - 0.5 - GTK_SHADOW_IN + False + 12 - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 + + + True + update-manager-logo.png + 0.5 + 0 + 0 + 0 + + + 0 + False + False + + - - 6 + True False 6 - + True - <b>New relesae available</b> - False + <big><b>Available updates</b></big> + +The are currently no software updates availabe. + True True GTK_JUSTIFY_LEFT - False + True False 0 - 0.5 + 0 0 0 PANGO_ELLIPSIZE_NONE @@ -137,14 +92,117 @@ The following packages are found to be upgradable. You can upgrade them by using - + True - True - Upgrade - True - GTK_RELIEF_NORMAL - True - + False + 0 + + + + True + Reload the package information from the server. + +If you have a permanent internet connection this is done automatically. If you are behind an internet connection that needs to be started by hand (e.g. a modem) you should use this button so that update-manager knows about new updates. + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-refresh + 4 + 0.5 + 0.5 + 2 + 2 + + + 0 + False + False + + + + + + True + _Reload + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 2 + 2 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + 0 @@ -153,151 +211,79 @@ The following packages are found to be upgradable. You can upgrade them by using + + 0 + True + True + - - - - 0 - False - True - - - - - - True - GTK_PROGRESS_LEFT_TO_RIGHT - 0 - 0.10000000149 - PANGO_ELLIPSIZE_NONE - - - 0 - False - False - - - - - - True - False - 12 - - - - True - <b>Packages to install:</b> - True - True - GTK_JUSTIFY_LEFT - False - False - 0 - 1 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 0 False - False - - - - - - True - 0 - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 1 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False + True - - True - Reload the package information from the server. - -If you have a permanent internet connection this is done automatically. If you are behind an internet connection that needs to be started by hand (e.g. a modem) you should use this button so that update-manager knows about new updates. - True - GTK_RELIEF_NORMAL - True - + + 0 + 0.5 + GTK_SHADOW_IN - + True 0.5 0.5 - 0 - 0 + 1 + 1 0 0 - 0 + 12 0 - + + 6 True False - 2 + 6 - + True - gtk-refresh - 4 - 0.5 + <b>New release available</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 0.5 - 2 - 2 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 - False - False + True + True - + True - Reload + True + Upgrade True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 2 - 2 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + GTK_RELIEF_NORMAL + True + 0 @@ -313,82 +299,240 @@ If you have a permanent internet connection this is done automatically. If you a 0 False - False - GTK_PACK_END + True - - - 0 - False - True - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - + True - True - False - True - False - True - False - False - False - + False + 4 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + False + True + False + True + False + False + False + + + + + + 0 + True + True + + + + 0 + True + True + - - - 0 - True - True - - - - - - True - True - False - 6 - - + True - False + True + False 6 + - - 200 + True - True - True - False - GTK_POS_TOP - False - False + False + 6 - + + 200 True - False - 0 + True + True + False + GTK_POS_TOP + False + False + + + + 6 + True + False + 6 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + False + 6 + 0 + 0 + 6 + 6 + 0 + + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_END + 0 + + + + True + True + GTK_RELIEF_NORMAL + True + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-cancel + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + Cancel downloading of the changelog + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + + + + + + 0 + False + False + + + + + False + True + + + + + + True + Changes + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + tab + + - + + 6 True True GTK_POLICY_AUTOMATIC @@ -397,12 +541,12 @@ If you have a permanent internet connection this is done automatically. If you a GTK_CORNER_TOP_LEFT - + True True False False - True + False GTK_JUSTIFY_LEFT GTK_WRAP_WORD False @@ -417,226 +561,83 @@ If you have a permanent internet connection this is done automatically. If you a - 0 - True - True + False + True - + True - GTK_BUTTONBOX_DEFAULT_STYLE - 0 - - - - True - True - GTK_RELIEF_NORMAL - True - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-cancel - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Cancel downloading the changelog - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - + Description + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 - 0 - False - False + tab - False - True - - - - - - True - Changes - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - GTK_JUSTIFY_LEFT - GTK_WRAP_WORD - False - 6 - 0 - 0 - 6 - 6 - 0 - - - - - - False - True + 0 + True + True + + - - - True - Description - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - + + + True + Show details + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 - 0 - True - True + label_item - - - - - True - <b>Details</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - label_item + 0 + False + True 0 - False + True True + 6 True False 6 @@ -647,19 +648,6 @@ If you have a permanent internet connection this is done automatically. If you a GTK_BUTTONBOX_DEFAULT_STYLE 6 - - - True - True - True - gtk-preferences - True - GTK_RELIEF_NORMAL - True - - - - True @@ -691,7 +679,7 @@ If you have a permanent internet connection this is done automatically. If you a True True True - gtk-close + gtk-cancel True GTK_RELIEF_NORMAL True @@ -749,7 +737,7 @@ If you have a permanent internet connection this is done automatically. If you a True - _Install + _Install Updates True False GTK_JUSTIFY_LEFT @@ -1241,4 +1229,126 @@ Need to get the changes from the central server + + 6 + + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + False + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + False + + + + True + False + 12 + + + + True + GTK_BUTTONBOX_END + + + 0 + False + True + GTK_PACK_END + + + + + + 6 + True + False + 6 + + + + True + <big><b>Reading package cache</b></big> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + Reading information about the installed packages. Depending on the speed of your computer this may take a bit. + False + False + GTK_JUSTIFY_LEFT + True + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + GTK_PROGRESS_LEFT_TO_RIGHT + 0 + 0.10000000149 + PANGO_ELLIPSIZE_NONE + + + 0 + False + False + + + + + + + + + 0 + True + True + + + + + + diff --git a/debian/changelog b/debian/changelog index 77c20978..6fcf4278 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +update-manager (0.40.3) dapper; urgency=low + + * improved the HIG comlicane, thanks to Sebastian Heinlein: + - Rename the button "close" to "cancel" + - Move status bar to a separate dialog + - Wording + - Add a wider border around the changelog and + description + - Align and capitalize the button "Cancel downloading" + (ubuntu: #28453) + + -- Michael Vogt Mon, 16 Jan 2006 12:56:29 +0100 + update-manager (0.40.2) dapper; urgency=low * SoftwareProperties/SoftwareProperties.py: -- cgit v1.2.3