diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-12 20:47:22 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-12 20:47:22 +0200 |
| commit | cc818961d3cae94e1240bf33b2349381aa1750fc (patch) | |
| tree | 2490019b1f11fe03e30d4580f02cfb37d9544e5a /SoftwareProperties/SoftwareProperties.py | |
| parent | c5279cfbb9ad48c9d95e535734f311d7c9d98818 (diff) | |
| parent | 00af0c2e8a7b983a1570e69a1a0696c51a58685b (diff) | |
| download | python-apt-cc818961d3cae94e1240bf33b2349381aa1750fc.tar.gz | |
* merged with update-manager--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 9ccf12ad..296c71dc 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -369,8 +369,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 |
