When creating a new window via dbus, pass on the layout request if there is one
This commit is contained in:
parent
1a5c4a9ff4
commit
35842b6ff7
@ -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')
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user