From 7a7dbeb2866322020c765df54d4764abc9849d50 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 15 Mar 2006 21:01:31 +0100 Subject: * do not try to install not shipped mime stuf --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index 873f5de4..a5916dfa 100755 --- a/setup.py +++ b/setup.py @@ -63,10 +63,6 @@ setup(name='update-manager', ), ('share/pixmaps', ["data/update-manager.png"] - ), - ('share/mime/packages', - ["data/mime/apt.xml"] - ) ] + I18NFILES + HELPFILES, ) -- cgit v1.2.3 From 73338a903877e5b77b3afbb273502e3db42df05e Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 17 Mar 2006 14:53:03 +0100 Subject: * Use the the number of available and not selected updates to determinate if the system is up-to-date - fixes #35300 --- UpdateManager/UpdateManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 07634d87..6a52a296 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -405,7 +405,7 @@ class UpdateManager(SimpleGladeApp): self.update_count() def update_count(self): - if len(self.packages) == 0: + if self.list.num_updates == 0: text_header= ""+_("Your system is up-to-date")+"" text_download = "" self.expander_details.set_sensitive(False) -- cgit v1.2.3 From 371c85d644701250fa245666ecd5cc94e7103676 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 17 Mar 2006 16:17:05 +0100 Subject: * use check instead of reload - no need to be so abstract --- data/UpdateManager.glade | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index 1e2d05b3..ab1db106 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -691,7 +691,7 @@ True - Reload the latest information about updates + Check for new updates True True GTK_RELIEF_NORMAL @@ -699,7 +699,7 @@ - + True 0.5 0.5 @@ -711,13 +711,13 @@ 0 - + True False 2 - + True gtk-refresh 4 @@ -734,9 +734,9 @@ - + True - _Reload + _Check True False GTK_JUSTIFY_LEFT @@ -1176,7 +1176,7 @@ True - _Reload + _Check True False GTK_JUSTIFY_LEFT @@ -1259,7 +1259,7 @@ True True - <b><big>You need to manually reload the latest information about updates</big></b> + <b><big>You must check for updates manually</big></b> Your system does not check for updates automatically. You can configure this behavior in "System" -> "Administration" -> "Software Properties". False -- cgit v1.2.3 From 066a73badbb192b7d937473579becf39b734fbb2 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 17 Mar 2006 16:22:47 +0100 Subject: * small wording issue --- data/UpdateManager.glade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index ab1db106..ee97a240 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -691,7 +691,7 @@ True - Check for new updates + Check for available updates True True GTK_RELIEF_NORMAL -- cgit v1.2.3 From c76b021053ff70b1766b2217eb5705929f1cc93e Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Fri, 17 Mar 2006 17:00:16 +0100 Subject: * allow to enable and disable channels/sources * disable edit and remove button if no sources are available * always select the first source at startup * use the reload icon on the check button --- SoftwareProperties/SoftwareProperties.py | 21 +++++++++- data/SoftwarePropertiesDialogs.glade | 66 +++++++++++++++++++++++++++++++- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 41da0b32..4902e44d 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -190,6 +190,11 @@ class SoftwareProperties(SimpleGladeApp): source_col = gtk.TreeViewColumn("Description", tr, markup=LIST_MARKUP) source_col.set_max_width(500) + toggle = gtk.CellRendererToggle() + toggle.connect("toggled", self.on_channel_toggled) + toggle_col = gtk.TreeViewColumn("Active", toggle, active=LIST_ENABLED) + + self.treeview_sources.append_column(toggle_col) self.treeview_sources.append_column(source_col) self.sourceslist = aptsources.SourcesList() @@ -207,7 +212,7 @@ class SoftwareProperties(SimpleGladeApp): def reload_sourceslist(self): self.source_store.clear() for source in self.sourceslist.list: - if source.invalid or source.disabled: + if source.invalid: continue (a_type, dist, comps) = self.matcher.match(source) @@ -217,6 +222,13 @@ class SoftwareProperties(SimpleGladeApp): contents +="%s (%s) \n%s" % (dist,a_type, comps) self.source_store.append([contents, not source.disabled, source]) + if len(self.source_store) < 1: + self.button_remove.set_sensitive(False) + self.button_edit.set_sensitive(False) + else: + self.button_remove.set_sensitive(True) + self.button_edit.set_sensitive(True) + self.treeview_sources.set_cursor(0) def reload_keyslist(self): self.keys_store.clear() @@ -445,6 +457,13 @@ class SoftwareProperties(SimpleGladeApp): self.reload_sourceslist() self.modified = True + def on_channel_toggled(self, cell_toggle, path): + """Enable or disable the selected channel""" + iter = self.source_store.get_iter((int(path),)) + source_entry = self.source_store.get_value(iter, LIST_ENTRY_OBJ) + source_entry.disabled = not source_entry.disabled + self.reload_sourceslist() + self.modified = True # FIXME: move this into a different file class GtkCdromProgress(apt.progress.CdromProgress, SimpleGladeApp): diff --git a/data/SoftwarePropertiesDialogs.glade b/data/SoftwarePropertiesDialogs.glade index d17f7ce5..a4d7ff41 100644 --- a/data/SoftwarePropertiesDialogs.glade +++ b/data/SoftwarePropertiesDialogs.glade @@ -1021,11 +1021,73 @@ Source True True True - _Reload - True GTK_RELIEF_NORMAL True -10 + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-refresh + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Reload + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + -- cgit v1.2.3 From ef3fb1ccfd79f94b0849703ae85f1a6c2c663dcb Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Mon, 20 Mar 2006 07:49:26 +0100 Subject: * Move the "check" button next to the "install" button --- data/UpdateManager.glade | 274 +++++++++++++++++++++++++---------------------- 1 file changed, 146 insertions(+), 128 deletions(-) diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index ee97a240..ac7a0345 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -275,83 +275,177 @@ - + True - True - True - True - GTK_RELIEF_NORMAL - True - + True + 6 - + True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 + Check for available updates + True + True + GTK_RELIEF_NORMAL + True + - + True - False - 2 + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 - + True - gtk-apply - 4 - 0.5 - 0.5 - 0 - 0 + False + 2 + + + + True + gtk-refresh + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Check + 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 - + + + + + 0 + False + True + + + + + + True + True + True + True + GTK_RELIEF_NORMAL + True + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 - + True - _Install Updates - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 + False + 2 + + + + True + gtk-apply + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Install Updates + 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 - + + 0 + False + True + 0 False - False + True @@ -688,82 +782,6 @@ GTK_BUTTONBOX_END 6 - - - True - Check for available updates - True - 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 - 0 - 0 - - - 0 - False - False - - - - - - True - _Check - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - True -- cgit v1.2.3 From 8cfb54ced335aa488ca3cfad00dad434617fb62a Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Mon, 20 Mar 2006 08:24:53 +0100 Subject: * Improve the rendering of the description in the update-manager --- UpdateManager/UpdateManager.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 6a52a296..27e6b7bb 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -346,14 +346,28 @@ class UpdateManager(SimpleGladeApp): iter = model.get_iter(path) # set descr - long_desc = model.get_value(iter, 5) + long_desc = model.get_value(iter, LIST_LONG_DESCR) if long_desc == None: return + # Skip the first line - it's a duplicate of the summary + i = long_desc.find("\n") + long_desc = long_desc[i+1:] + # do some regular expression magic on the description + # Add a newline before each bullet + p = re.compile(r'^(\s|\t)*(\*|0|-)',re.MULTILINE) + long_desc = p.sub('\n*', long_desc) + # replace all newlines by spaces + p = re.compile(r'\n', re.MULTILINE) + long_desc = p.sub(" ", long_desc) + # replace all multiple spaces by newlines + p = re.compile(r'\s\s+', re.MULTILINE) + long_desc = p.sub("\n", long_desc) + desc_buffer = self.textview_descr.get_buffer() desc_buffer.set_text(utf8(long_desc)) # now do the changelog - name = model.get_value(iter, 2) + name = model.get_value(iter, LIST_NAME) if name == None: return @@ -609,7 +623,8 @@ class UpdateManager(SimpleGladeApp): contents = "%s\n%s\n\n" % (name, summary) contents = contents + _("New version: %s (Size: %s)") % (pkg.candidateVersion,apt.SizeToStr(pkg.packageSize)) + "" - iter = self.store.append([True, contents, pkg.name, pkg.summary, pkg.candidateVersion, pkg.description, pkg]) + iter = self.store.append([True, contents, pkg.name, pkg.summary, + pkg.candidateVersion, pkg.description, pkg]) self.add_update(pkg) i = i + 1 -- cgit v1.2.3 From 85738204aa2e56e2fafd1eb3ec724b4b3d6fa21c Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Mon, 20 Mar 2006 13:14:53 +0100 Subject: * do not show the reload information if there is a parent window for the preferences * try to reselect the previous selected channel after reloading --- SoftwareProperties/SoftwareProperties.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 4902e44d..0378bf29 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -210,6 +210,7 @@ class SoftwareProperties(SimpleGladeApp): self.treeview2.append_column(keys_col) def reload_sourceslist(self): + path = self.treeview_sources.get_cursor() self.source_store.clear() for source in self.sourceslist.list: if source.invalid: @@ -226,9 +227,10 @@ class SoftwareProperties(SimpleGladeApp): self.button_remove.set_sensitive(False) self.button_edit.set_sensitive(False) else: + if not self.treeview_sources.get_cursor(path): + self.treeview_sources.set_cursor(0) self.button_remove.set_sensitive(True) self.button_edit.set_sensitive(True) - self.treeview_sources.set_cursor(0) def reload_keyslist(self): self.keys_store.clear() @@ -340,7 +342,9 @@ class SoftwareProperties(SimpleGladeApp): self.sourceslist.backup(".save") self.sourceslist.save() # show a dialog that a reload of the channel information is required - if self.modified == True: + # only if there is no parent defined + if self.modified == True and \ + self.window_main.get_transient_for() != None: d = dialog_cache_outdated.DialogCacheOutdated(self.window_main, self.datadir) res = d.run() -- cgit v1.2.3 From 480b1f25929a339b0de10096f0162308e8a0f6c3 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Mon, 20 Mar 2006 16:49:57 +0100 Subject: * Restore the correct path after reloading the sources list --- SoftwareProperties/SoftwareProperties.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 0378bf29..5f4b5054 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -210,7 +210,7 @@ class SoftwareProperties(SimpleGladeApp): self.treeview2.append_column(keys_col) def reload_sourceslist(self): - path = self.treeview_sources.get_cursor() + (path_x, path_y) = self.treeview_sources.get_cursor() self.source_store.clear() for source in self.sourceslist.list: if source.invalid: @@ -227,7 +227,7 @@ class SoftwareProperties(SimpleGladeApp): self.button_remove.set_sensitive(False) self.button_edit.set_sensitive(False) else: - if not self.treeview_sources.get_cursor(path): + if path_x == None or self.treeview_sources.set_cursor(path_x): self.treeview_sources.set_cursor(0) self.button_remove.set_sensitive(True) self.button_edit.set_sensitive(True) -- cgit v1.2.3 From 313d2bb993c4132ad2043ff1ad96234884f82264 Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Tue, 21 Mar 2006 19:19:32 +0100 Subject: * Fixed reload information * glade file cleanup - should fix some annoyances with focus stealing --- SoftwareProperties/SoftwareProperties.py | 2 +- UpdateManager/UpdateManager.py | 6 ++++-- data/UpdateManager.glade | 16 ++++++++-------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 5f4b5054..099576d0 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -344,7 +344,7 @@ class SoftwareProperties(SimpleGladeApp): # show a dialog that a reload of the channel information is required # only if there is no parent defined if self.modified == True and \ - self.window_main.get_transient_for() != None: + self.window_main.get_transient_for() == None: d = dialog_cache_outdated.DialogCacheOutdated(self.window_main, self.datadir) res = d.run() diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 27e6b7bb..1c996a66 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -224,6 +224,8 @@ class UpdateManager(SimpleGladeApp): None, domain="update-manager") self.window_main.set_sensitive(False) + self.window_main.grab_focus() + self.button_close.grab_focus() self.packages = [] self.dl_size = 0 @@ -237,7 +239,7 @@ class UpdateManager(SimpleGladeApp): # useful exit stuff self.window_main.connect("delete_event", self.close) - self.button_cancel.connect("clicked", lambda w: self.exit()) + self.button_close.connect("clicked", lambda w: self.exit()) # the treeview (move into it's own code!) self.store = gtk.ListStore(gobject.TYPE_BOOLEAN, str, str, str, str, str, @@ -425,7 +427,7 @@ class UpdateManager(SimpleGladeApp): self.expander_details.set_sensitive(False) self.treeview_update.set_sensitive(False) self.label_downsize.set_text="" - self.button_cancel.grab_default() + self.button_close.grab_default() else: text_header = ""+gettext.ngettext("You can install one update", "You can install %s updates" % len(self.store), len(self.store))+"" diff --git a/data/UpdateManager.glade b/data/UpdateManager.glade index ac7a0345..cfa5176c 100644 --- a/data/UpdateManager.glade +++ b/data/UpdateManager.glade @@ -7,7 +7,7 @@ True Software Updates GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER + GTK_WIN_POS_NONE False 600 True @@ -783,7 +783,7 @@ 6 - + True True True @@ -818,7 +818,7 @@ Release Notes GTK_WINDOW_TOPLEVEL GTK_WIN_POS_CENTER_ON_PARENT - False + True 600 500 True @@ -906,7 +906,7 @@ GTK_WINDOW_TOPLEVEL GTK_WIN_POS_CENTER_ON_PARENT - False + True False False True @@ -1124,7 +1124,7 @@ GTK_WINDOW_TOPLEVEL GTK_WIN_POS_CENTER_ON_PARENT - False + True False False True @@ -1342,8 +1342,8 @@ Your system does not check for updates automatically. You can configure this beh 6 GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False + GTK_WIN_POS_CENTER_ON_PARENT + True False False True @@ -1351,7 +1351,7 @@ Your system does not check for updates automatically. You can configure this beh True GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST - True + False False -- cgit v1.2.3 From 9e10ae7190a2706a1a876a7bd214fd4d0ed4d43d Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 22 Mar 2006 17:43:54 +0100 Subject: * Better English (tm) - fixes #35985 --- channels/Ubuntu.info.in | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/channels/Ubuntu.info.in b/channels/Ubuntu.info.in index 002a82f6..b0358284 100644 --- a/channels/Ubuntu.info.in +++ b/channels/Ubuntu.info.in @@ -6,7 +6,7 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ _Description: Ubuntu 6.04 'Dapper Drake' Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright @@ -23,7 +23,7 @@ BaseURI: http://security.ubuntu.com/ubuntu/ _Description: Ubuntu 6.04 Security Updates Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright @@ -40,7 +40,7 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ _Description: Ubuntu 6.04 Updates Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright @@ -57,7 +57,7 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ _Description: Ubuntu 6.04 Backports Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright @@ -74,7 +74,7 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ _Description: Ubuntu 5.10 'Breezy Badger' Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright @@ -91,7 +91,7 @@ BaseURI: http://security.ubuntu.com/ubuntu/ _Description: Ubuntu 5.10 Security Updates Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright @@ -108,7 +108,7 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ _Description: Ubuntu 5.10 Updates Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright @@ -125,7 +125,7 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ _Description: Ubuntu 5.10 Backports Component: main Enabled: 1 -_CompDescription: Oficially supported +_CompDescription: Officially supported Component: restricted Enabled: 1 _CompDescription: Restricted copyright -- cgit v1.2.3