diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-22 23:37:02 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-22 23:37:02 +0100 |
| commit | c6211083b2442ef7f3294335c1ef1f2522bca3ca (patch) | |
| tree | 4e75fe6abc343e50882c0bc4d39595ba0781d5f1 /SoftwareProperties | |
| parent | f82bab3cff10463e934a8f52892b312cdca2f225 (diff) | |
| parent | 82583acbe28b9bbfc581df8081d22191af342801 (diff) | |
| download | python-apt-c6211083b2442ef7f3294335c1ef1f2522bca3ca.tar.gz | |
* merged from the laptop branch
Diffstat (limited to 'SoftwareProperties')
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 11 | ||||
| -rw-r--r-- | SoftwareProperties/dialog_cache_outdated.py | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 4902e44d..5d39f5b1 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -73,6 +73,7 @@ class SoftwareProperties(SimpleGladeApp): self.window_main.set_transient_for(parent) # If externally called, reparent to external application. + self.options = options if options and options.toplevel != None: toplevel = gtk.gdk.window_foreign_new(int(options.toplevel)) self.window_main.window.set_transient_for(toplevel) @@ -188,7 +189,7 @@ class SoftwareProperties(SimpleGladeApp): tr.set_property("ypad", 10) source_col = gtk.TreeViewColumn("Description", tr, markup=LIST_MARKUP) - source_col.set_max_width(500) + #source_col.set_max_width(500) toggle = gtk.CellRendererToggle() toggle.connect("toggled", self.on_channel_toggled) @@ -210,6 +211,7 @@ class SoftwareProperties(SimpleGladeApp): self.treeview2.append_column(keys_col) def reload_sourceslist(self): + (path_x, path_y) = self.treeview_sources.get_cursor() self.source_store.clear() for source in self.sourceslist.list: if source.invalid: @@ -226,9 +228,10 @@ class SoftwareProperties(SimpleGladeApp): self.button_remove.set_sensitive(False) self.button_edit.set_sensitive(False) else: + 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) - self.treeview_sources.set_cursor(0) def reload_keyslist(self): self.keys_store.clear() @@ -340,7 +343,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.options.toplevel == None: d = dialog_cache_outdated.DialogCacheOutdated(self.window_main, self.datadir) res = d.run() diff --git a/SoftwareProperties/dialog_cache_outdated.py b/SoftwareProperties/dialog_cache_outdated.py index 11935519..de85cc2e 100644 --- a/SoftwareProperties/dialog_cache_outdated.py +++ b/SoftwareProperties/dialog_cache_outdated.py @@ -49,7 +49,7 @@ class DialogCacheOutdated: pass cmd = ["/usr/sbin/synaptic", "--hide-main-window", "--non-interactive", - "--parent-window-id", "%s" % (id), + "--parent-window-id", "%s" % (window_id), "--update-at-startup"] subprocess.call(cmd) lock.release() |
