[kupfer: 23/67] applications, thunar: Use AppLeaf.launch



commit 78bdf578d4fc704bd3d2c54c7b33dfc5ca1ce4ad
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Tue Mar 15 22:52:29 2011 +0100

    applications, thunar: Use AppLeaf.launch

 kupfer/plugin/applications.py |   11 +++++------
 kupfer/plugin/thunar.py       |    2 +-
 2 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/kupfer/plugin/applications.py b/kupfer/plugin/applications.py
index a2d1557..d71dbd2 100644
--- a/kupfer/plugin/applications.py
+++ b/kupfer/plugin/applications.py
@@ -69,15 +69,14 @@ class OpenWith (Action):
 	def __init__(self):
 		Action.__init__(self, _("Open With..."))
 
-	def _activate(self, desktop_item, paths):
-		utils.launch_app(desktop_item, paths=paths)
-	def activate(self, leaf, obj):
-		desktop_item = obj.object
-		self._activate(desktop_item, (leaf.object, ))
+	def _activate(self, app_leaf, paths):
+		app_leaf.launch(paths=paths)
+	def activate(self, leaf, iobj):
+		self._activate(iobj, (leaf.object, ))
 	def activate_multiple(self, objects, iobjects):
 		# for each application, launch all the files
 		for iobj_app in iobjects:
-			self._activate(iobj_app.object, [L.object for L in objects])
+			self._activate(iobj_app, [L.object for L in objects])
 
 	def item_types(self):
 		yield FileLeaf
diff --git a/kupfer/plugin/thunar.py b/kupfer/plugin/thunar.py
index deb5f4a..28a9780 100644
--- a/kupfer/plugin/thunar.py
+++ b/kupfer/plugin/thunar.py
@@ -104,7 +104,7 @@ class SendTo (Action):
 
 	def activate_multiple(self, leaves, iobjs):
 		for app in iobjs:
-			utils.launch_app(app.object, paths=[leaf.object for leaf in leaves])
+			app.launch(paths=[leaf.object for leaf in leaves])
 
 	def activate(self, leaf, iobj):
 		self.activate_multiple((leaf, ), (iobj, ))



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