[kupfer] apt_tools: Support activate_multiple in install



commit fada301e6c30facb989c59eebf03a7a75787e753
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Tue Apr 13 01:56:13 2010 +0200

    apt_tools: Support activate_multiple in install

 kupfer/plugin/apt_tools.py |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/kupfer/plugin/apt_tools.py b/kupfer/plugin/apt_tools.py
index 847b083..302f60c 100644
--- a/kupfer/plugin/apt_tools.py
+++ b/kupfer/plugin/apt_tools.py
@@ -70,10 +70,15 @@ class ShowPackageInfo (Action):
 class InstallPackage (Action):
 	def __init__(self):
 		Action.__init__(self, _("Install"))
+
 	def activate(self, leaf):
-		pkg = leaf.object.strip()
-		cli = "%s %s" % (__kupfer_settings__["installation_method"], pkg)
-		utils.launch_commandline(cli, in_terminal=True)
+		self.activate_multiple((leaf, ))
+
+	def activate_multiple(self, objs):
+		program = (__kupfer_settings__["installation_method"])
+		pkgs = " ".join(o.object.strip() for o in objs)
+		utils.launch_commandline("%s %s" % (program, pkgs),
+		                         in_terminal=True)
 
 	def item_types(self):
 		yield Package



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]