move cmdline option conversion to dbus format to optionparse
This commit is contained in:
parent
1ad579ce03
commit
c04b6aeb87
|
@ -66,7 +66,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
dbg ("%s starting up, version %s" % (APP_NAME, APP_VERSION))
|
dbg ("%s starting up, version %s" % (APP_NAME, APP_VERSION))
|
||||||
|
|
||||||
OPTIONS = terminatorlib.optionparse.parse_options()
|
OPTIONS,dbus_options = terminatorlib.optionparse.parse_options()
|
||||||
|
|
||||||
TERMINATOR = Terminator()
|
TERMINATOR = Terminator()
|
||||||
TERMINATOR.set_origcwd(ORIGCWD)
|
TERMINATOR.set_origcwd(ORIGCWD)
|
||||||
|
@ -102,7 +102,7 @@ if __name__ == '__main__':
|
||||||
if val == True:
|
if val == True:
|
||||||
val = 'True'
|
val = 'True'
|
||||||
optionslist[opt] = val and '%s'%val or ''
|
optionslist[opt] = val and '%s'%val or ''
|
||||||
optionslist = dbus.Dictionary(optionslist, signature='ss')
|
optionslist = dbus.Dictionary(dbus_options, signature='ss')
|
||||||
if OPTIONS.new_tab:
|
if OPTIONS.new_tab:
|
||||||
dbg('Requesting a new tab')
|
dbg('Requesting a new tab')
|
||||||
ipc.new_tab_cmdline(optionslist)
|
ipc.new_tab_cmdline(optionslist)
|
||||||
|
|
|
@ -149,7 +149,16 @@ icon for the window (by file or name)'))
|
||||||
|
|
||||||
configobj.options_set(options)
|
configobj.options_set(options)
|
||||||
|
|
||||||
|
optionslist = {}
|
||||||
|
for opt, val in list(options.__dict__.items()):
|
||||||
|
if type(val) == type([]):
|
||||||
|
val = ' '.join(val)
|
||||||
|
if val == True:
|
||||||
|
val = 'True'
|
||||||
|
optionslist[opt] = val and '%s'%val or ''
|
||||||
|
# optionslist = dbus.Dictionary(optionslist, signature='ss')
|
||||||
if util.DEBUG == True:
|
if util.DEBUG == True:
|
||||||
dbg('OptionParse::parse_options: command line options: %s' % options)
|
dbg('OptionParse::parse_options: command line options: %s' % options)
|
||||||
|
|
||||||
return(options)
|
|
||||||
|
return(options,optionslist)
|
||||||
|
|
Loading…
Reference in New Issue