Revert that and instead make the Terminal usage of the options object be more optional

This commit is contained in:
Chris Jones 2010-02-21 11:58:17 +00:00
parent f9e5a69c71
commit bdac9e620a
2 changed files with 5 additions and 6 deletions

View File

@ -411,8 +411,6 @@ class ConfigBase(Borg):
self.layouts = {} self.layouts = {}
for layout in DEFAULTS['layouts']: for layout in DEFAULTS['layouts']:
self.layouts[layout] = copy(DEFAULTS['layouts'][layout]) self.layouts[layout] = copy(DEFAULTS['layouts'][layout])
if self.command_line_options is None:
self.command_line_options = {}
def defaults_to_configspec(self): def defaults_to_configspec(self):
"""Convert our tree of default values into a ConfigObj validation """Convert our tree of default values into a ConfigObj validation

View File

@ -1050,10 +1050,10 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
self.vte.grab_focus() self.vte.grab_focus()
options = self.config.options_get() options = self.config.options_get()
if options.command: if options and options.command:
command = options.command command = options.command
options.command = None options.command = None
elif options.execute: elif options and options.execute:
command = options.execute command = options.execute
options.execute = None options.execute = None
elif self.config['use_custom_command']: elif self.config['use_custom_command']:
@ -1220,8 +1220,9 @@ for %s (%s)' % (name, urlplugin.__class__.__name__))
dbg(layout) dbg(layout)
if layout.has_key('command') and layout['command'] != '': if layout.has_key('command') and layout['command'] != '':
options = self.config.options_get() options = self.config.options_get()
options.command = layout['command'] if options:
self.config.options_set(options) options.command = layout['command']
self.config.options_set(options)
# There now begins a great list of keyboard event handlers # There now begins a great list of keyboard event handlers
def key_zoom_in(self): def key_zoom_in(self):