Merge pull request #307 from mattrose/unhide
add a commandline flag to unhide any windows
This commit is contained in:
commit
904676057e
|
@ -108,6 +108,9 @@ if __name__ == '__main__':
|
|||
if OPTIONS.new_tab:
|
||||
dbg('Requesting a new tab')
|
||||
ipc.new_tab_cmdline(optionslist)
|
||||
elif OPTIONS.unhide:
|
||||
print('requesting to unhide windows')
|
||||
ipc.unhide_cmdline(optionslist)
|
||||
else:
|
||||
dbg('Requesting a new window')
|
||||
ipc.new_window_cmdline(optionslist)
|
||||
|
|
|
@ -86,6 +86,13 @@ class DBusService(Borg, dbus.service.Object):
|
|||
window = self.terminator.get_windows()[0]
|
||||
window.tab_new()
|
||||
|
||||
@dbus.service.method(BUS_NAME, in_signature='a{ss}')
|
||||
def unhide_cmdline(self,options=dbus.Dictionary):
|
||||
dbg('unhide_cmdline')
|
||||
for window in self.terminator.get_windows():
|
||||
if not window.get_property('visible'):
|
||||
window.on_hide_window()
|
||||
|
||||
@dbus.service.method(BUS_NAME)
|
||||
def new_window(self):
|
||||
"""Create a new Window"""
|
||||
|
@ -216,6 +223,10 @@ def new_tab_cmdline(session, options):
|
|||
"""Call the dbus method to open a new tab in the first window"""
|
||||
session.new_tab_cmdline(options)
|
||||
|
||||
@with_proxy
|
||||
def unhide_cmdline(session,options):
|
||||
session.unhide_cmdline(options)
|
||||
|
||||
@with_proxy
|
||||
def new_window(session, options):
|
||||
"""Call the dbus method to open a new window"""
|
||||
|
|
|
@ -102,6 +102,9 @@ icon for the window (by file or name)'))
|
|||
help=_('Comma separated list of methods to limit debugging to'))
|
||||
parser.add_option('--new-tab', action='store_true', dest='new_tab',
|
||||
help=_('If Terminator is already running, just open a new tab'))
|
||||
parser.add_option('--unhide', action='store_true', dest='unhide',
|
||||
help=_('If Terminator is already running, just unhide all hidden windows'))
|
||||
|
||||
for item in ['--sm-client-id', '--sm-config-prefix', '--screen', '-n',
|
||||
'--no-gconf' ]:
|
||||
parser.add_option(item, dest='dummy', action='store',
|
||||
|
|
Loading…
Reference in New Issue