diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-27 20:18:16 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-03-27 20:18:16 +0200 |
| commit | d35c7defd7e19b1f7bcb193c86bd1be5c50dd491 (patch) | |
| tree | abeafc5b54efdbc96997938c40c372b672872a1a /SoftwareProperties/SoftwareProperties.py | |
| parent | 6297fce66c8243488048690472f0d1ebc329dd52 (diff) | |
| download | python-apt-d35c7defd7e19b1f7bcb193c86bd1be5c50dd491.tar.gz | |
* added the patch from chipzz
Diffstat (limited to 'SoftwareProperties/SoftwareProperties.py')
| -rw-r--r-- | SoftwareProperties/SoftwareProperties.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 9613b49e..8453cc24 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -363,8 +363,18 @@ class SoftwareProperties(SimpleGladeApp): if not iter: return source_entry = model.get_value(iter, LIST_ENTRY_OBJ) - dialog = dialog_edit.dialog_edit(self.window_main, self.sourceslist, - source_entry, self.datadir) + # see if we know what this thing should look like + found_matcher = False + for item in aptsources.SourceEntryTemplates(self.datadir).templates: + if item.matches(source_entry): + found_matcher = True + break + if found_matcher: + dialog = dialog_add.dialog_add(self.window_main, self.sourceslist, + self.datadir, source_entry) + else: + dialog = dialog_edit.dialog_edit(self.window_main, self.sourceslist, + source_entry, self.datadir) if dialog.run() == gtk.RESPONSE_OK: self.reload_sourceslist() self.modified = True |
