When creating a new window via dbus, pass on the layout request if there is one

This commit is contained in:
Chris Jones 2010-11-29 20:46:49 +00:00
parent 1a5c4a9ff4
commit 35842b6ff7
2 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ if __name__ == '__main__':
ipc.DBusService() ipc.DBusService()
except ipc.DBusException: except ipc.DBusException:
dbg('Unable to become master process, requesting a new window') dbg('Unable to become master process, requesting a new window')
ipc.new_window() ipc.new_window(OPTIONS.layout)
sys.exit() sys.exit()
except ImportError: except ImportError:
dbg('dbus not imported') dbg('dbus not imported')

View File

@ -56,10 +56,10 @@ class DBusService(Borg, dbus.service.Object):
self.terminator = Terminator() self.terminator = Terminator()
@dbus.service.method(BUS_NAME) @dbus.service.method(BUS_NAME)
def new_window(self): def new_window(self, layout='default'):
"""Create a new Window""" """Create a new Window"""
dbg('dbus method called') dbg('dbus method called')
self.terminator.create_layout('default') self.terminator.create_layout(layout)
self.terminator.layout_done() self.terminator.layout_done()
def with_proxy(func): def with_proxy(func):
@ -72,7 +72,7 @@ def with_proxy(func):
return _exec return _exec
@with_proxy @with_proxy
def new_window(session): def new_window(session, layout='default'):
"""Call the dbus method to open a new window""" """Call the dbus method to open a new window"""
session.new_window() session.new_window(layout)