summaryrefslogtreecommitdiff
path: root/SoftwareProperties/SoftwareProperties.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-03-27 20:18:16 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-03-27 20:18:16 +0200
commitd35c7defd7e19b1f7bcb193c86bd1be5c50dd491 (patch)
treeabeafc5b54efdbc96997938c40c372b672872a1a /SoftwareProperties/SoftwareProperties.py
parent6297fce66c8243488048690472f0d1ebc329dd52 (diff)
downloadpython-apt-d35c7defd7e19b1f7bcb193c86bd1be5c50dd491.tar.gz
* added the patch from chipzz
Diffstat (limited to 'SoftwareProperties/SoftwareProperties.py')
-rw-r--r--SoftwareProperties/SoftwareProperties.py14
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