summaryrefslogtreecommitdiff
path: root/SoftwareProperties
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@server>2006-03-20 13:14:53 +0100
committerSebastian Heinlein <sebi@server>2006-03-20 13:14:53 +0100
commit85738204aa2e56e2fafd1eb3ec724b4b3d6fa21c (patch)
treec91d191b643a8de31bc341f087573f7cf1606e6e /SoftwareProperties
parent8cfb54ced335aa488ca3cfad00dad434617fb62a (diff)
downloadpython-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.py8
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()