diff options
| author | Sebastian Heinlein <sebi@server> | 2006-03-20 13:14:53 +0100 |
|---|---|---|
| committer | Sebastian Heinlein <sebi@server> | 2006-03-20 13:14:53 +0100 |
| commit | 85738204aa2e56e2fafd1eb3ec724b4b3d6fa21c (patch) | |
| tree | c91d191b643a8de31bc341f087573f7cf1606e6e /SoftwareProperties | |
| parent | 8cfb54ced335aa488ca3cfad00dad434617fb62a (diff) | |
| download | python-apt-85738204aa2e56e2fafd1eb3ec724b4b3d6fa21c.tar.gz | |
* do not show the reload information if there is a parent window for the
preferences
* try to reselect the previous selected channel after reloading
Diffstat (limited to 'SoftwareProperties')
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 8 |
1 files 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() |
