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(-) (limited to 'SoftwareProperties/SoftwareProperties.py') 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