[kupfer: 41/51] gnome_terminal: Port to wants_context to use current display



commit 5d23298e69c8ef58084a140e0039082d6aefcbd3
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Mon Mar 28 16:51:48 2011 +0200

    gnome_terminal: Port to wants_context to use current display

 kupfer/plugin/gnome_terminal.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/gnome_terminal.py b/kupfer/plugin/gnome_terminal.py
index 230758b..0f8d86e 100644
--- a/kupfer/plugin/gnome_terminal.py
+++ b/kupfer/plugin/gnome_terminal.py
@@ -35,9 +35,13 @@ class OpenSession(Action):
 	def __init__(self):
 		Action.__init__(self, _("Open"))
 
-	def activate(self, leaf):
+	def wants_context(self):
+		return True
+
+	def activate(self, leaf, ctx):
 		utils.spawn_async(["gnome-terminal",
-				   "--profile=%s" % leaf.object],
+				   "--profile=%s" % leaf.object,
+				   "--display=%s" % ctx.environment.get_display()],
 				  in_dir=os.path.expanduser("~"))
 
 	def get_gicon(self):



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