Now can download selections
svn: r15729
This commit is contained in:
parent
40820ea6ea
commit
5ad0aa48dc
@ -337,7 +337,7 @@ class ViewManager(CLIManager):
|
|||||||
version_str_to_tup(plugin.version, 3)):
|
version_str_to_tup(plugin.version, 3)):
|
||||||
LOG.debug(" Downloading '%s'..." % plugin_dict["z"])
|
LOG.debug(" Downloading '%s'..." % plugin_dict["z"])
|
||||||
if "update" in whattypes:
|
if "update" in whattypes:
|
||||||
addon_update_list.append(("update",
|
addon_update_list.append(("Updated",
|
||||||
"%s/download/%s" %
|
"%s/download/%s" %
|
||||||
(ADDONS_URL,
|
(ADDONS_URL,
|
||||||
plugin_dict["z"]),
|
plugin_dict["z"]),
|
||||||
@ -347,7 +347,7 @@ class ViewManager(CLIManager):
|
|||||||
else:
|
else:
|
||||||
LOG.debug(" '%s' is not installed" % plugin_dict["n"])
|
LOG.debug(" '%s' is not installed" % plugin_dict["n"])
|
||||||
if "new" in whattypes:
|
if "new" in whattypes:
|
||||||
addon_update_list.append(("new",
|
addon_update_list.append(("New",
|
||||||
"%s/download/%s" %
|
"%s/download/%s" %
|
||||||
(ADDONS_URL,
|
(ADDONS_URL,
|
||||||
plugin_dict["z"]),
|
plugin_dict["z"]),
|
||||||
@ -374,21 +374,33 @@ class ViewManager(CLIManager):
|
|||||||
apply_button.connect("clicked", self.install_addons)
|
apply_button.connect("clicked", self.install_addons)
|
||||||
cancel_button.connect("clicked",
|
cancel_button.connect("clicked",
|
||||||
lambda obj: self.update_dialog.destroy())
|
lambda obj: self.update_dialog.destroy())
|
||||||
list = ListModel.ListModel(glade.get_object("list"),
|
self.list = ListModel.ListModel(glade.get_object("list"),
|
||||||
[('Name',-1,10)],)
|
[
|
||||||
|
# name, click?, width, toggle
|
||||||
|
(_('Select'), -1, 60, 1),
|
||||||
|
(_('Type'), 1, 120),
|
||||||
|
(_('Name'), 1, 200),
|
||||||
|
(_('Description'), 1, 200),
|
||||||
|
('', 1, 0),
|
||||||
|
])
|
||||||
pos = None
|
pos = None
|
||||||
for (status,plugin_url,plugin_dict) in addon_update_list:
|
for (status,plugin_url,plugin_dict) in addon_update_list:
|
||||||
|
iter = self.list.add([False,
|
||||||
|
"%s %s" % (_(status), plugin_dict["t"]),
|
||||||
|
"%s (%s)" % (plugin_dict["n"],
|
||||||
|
plugin_dict["v"]),
|
||||||
|
plugin_dict["d"],
|
||||||
|
plugin_url])
|
||||||
if pos is None:
|
if pos is None:
|
||||||
pos = list.add([plugin_dict["n"]])
|
pos = iter
|
||||||
else:
|
|
||||||
list.add([plugin_dict["n"]])
|
|
||||||
if pos:
|
if pos:
|
||||||
list.selection.select_iter(pos)
|
self.list.selection.select_iter(pos)
|
||||||
self.update_dialog.run()
|
self.update_dialog.run()
|
||||||
|
|
||||||
def install_addons(self, obj):
|
def install_addons(self, obj):
|
||||||
#for plugin_url in addon_update_list:
|
for row in self.list.model: # treemodelrow
|
||||||
# load_addon_file(plugin_url, callback=print)
|
if row[0]: # toggle
|
||||||
|
load_addon_file(row[4], callback=print)
|
||||||
self.update_dialog.destroy()
|
self.update_dialog.destroy()
|
||||||
|
|
||||||
def _errordialog(title, errormessage):
|
def _errordialog(title, errormessage):
|
||||||
|
Loading…
Reference in New Issue
Block a user