summaryrefslogtreecommitdiff
path: root/SoftwareProperties/SoftwareProperties.py
diff options
context:
space:
mode:
authorglatzor@ubuntu.com <>2006-07-22 16:57:22 +0200
committerglatzor@ubuntu.com <>2006-07-22 16:57:22 +0200
commitd5e1d9349540d5d1c6f63b2f482b5b9ea6a68836 (patch)
tree1418e7051b072650f74fb6acb3508d5ac46a7ce7 /SoftwareProperties/SoftwareProperties.py
parentbaf6630e1531c73128aba1625c8758b0836b9028 (diff)
downloadpython-apt-d5e1d9349540d5d1c6f63b2f482b5b9ea6a68836.tar.gz
* Backported the add dialog for drag and drop and mime handling
* Removed references to the obsolete edit_predefined dialog
Diffstat (limited to 'SoftwareProperties/SoftwareProperties.py')
-rw-r--r--SoftwareProperties/SoftwareProperties.py32
1 files changed, 12 insertions, 20 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index 60a0208a..73544205 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -42,8 +42,7 @@ import aptsources
import dialog_add
import dialog_edit
import dialog_cache_outdated
-#import dialog_edit_predefined
-#import dialog_sources_list
+import dialog_add_sources_list
from dialog_apt_key import apt_key
from utils import *
@@ -225,7 +224,6 @@ class SoftwareProperties(SimpleGladeApp):
if self.file != None:
self.open_file(file)
-
def distro_to_widgets(self):
"""
Represent the distro information in the user interface
@@ -442,16 +440,15 @@ class SoftwareProperties(SimpleGladeApp):
def open_file(self, file):
"""Show an confirmation for adding the channels of the specified file"""
- #dialog = dialog_sources_list.AddSourcesList(self.window_main,
- # self.sourceslist,
- # self.render_source,
- # self.get_comparable,
- # self.datadir,
- # file)
- #res = dialog.run()
- #if res == gtk.RESPONSE_OK:
- # self.modified_sourceslist()
- print "droped a sources.list"
+ dialog = dialog_add_sources_list.AddSourcesList(self.window_main,
+ self.sourceslist,
+ self.render_source,
+ self.get_comparable,
+ self.datadir,
+ file)
+ res = dialog.run()
+ if res == gtk.RESPONSE_OK:
+ self.modified_sourceslist()
def on_sources_drag_data_received(self, widget, context, x, y,
selection, target_type, timestamp):
@@ -804,13 +801,8 @@ class SoftwareProperties(SimpleGladeApp):
if not iter:
return
source_entry = model.get_value(iter, LIST_ENTRY_OBJ)
- if source_entry.template == None:
- dialog = dialog_edit.dialog_edit(self.window_main, self.sourceslist,
- source_entry, self.datadir)
- else:
- dialog = dialog_edit_predefined.dialog_edit_predefined(self.window_main,
- self.sourceslist,
- source_entry, self.datadir)
+ dialog = dialog_edit.dialog_edit(self.window_main, self.sourceslist,
+ source_entry, self.datadir)
if dialog.run() == gtk.RESPONSE_OK:
self.modified_sourceslist()