From 35842b6ff79e0a45d019b19f00aab1e60f55efd3 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 29 Nov 2010 20:46:49 +0000 Subject: [PATCH] When creating a new window via dbus, pass on the layout request if there is one --- terminator | 2 +- terminatorlib/ipc.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/terminator b/terminator index 5c344aca..41e78905 100755 --- a/terminator +++ b/terminator @@ -64,7 +64,7 @@ if __name__ == '__main__': ipc.DBusService() except ipc.DBusException: dbg('Unable to become master process, requesting a new window') - ipc.new_window() + ipc.new_window(OPTIONS.layout) sys.exit() except ImportError: dbg('dbus not imported') diff --git a/terminatorlib/ipc.py b/terminatorlib/ipc.py index cfec4dfa..3964c60f 100644 --- a/terminatorlib/ipc.py +++ b/terminatorlib/ipc.py @@ -56,10 +56,10 @@ class DBusService(Borg, dbus.service.Object): self.terminator = Terminator() @dbus.service.method(BUS_NAME) - def new_window(self): + def new_window(self, layout='default'): """Create a new Window""" dbg('dbus method called') - self.terminator.create_layout('default') + self.terminator.create_layout(layout) self.terminator.layout_done() def with_proxy(func): @@ -72,7 +72,7 @@ def with_proxy(func): return _exec @with_proxy -def new_window(session): +def new_window(session, layout='default'): """Call the dbus method to open a new window""" - session.new_window() + session.new_window(layout)