From d35c7defd7e19b1f7bcb193c86bd1be5c50dd491 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 27 Mar 2006 20:18:16 +0200 Subject: * added the patch from chipzz --- SoftwareProperties/SoftwareProperties.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'SoftwareProperties/SoftwareProperties.py') 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 -- cgit v1.2.3