From ceb0582fd925de7d8f2db87e015398cca51c8f62 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 3 Dec 2007 19:38:55 +0000 Subject: [PATCH] Remove useless feature to override settings yet another way. Remove duplication of hardcoding in TerminatorTerm.defaults{} but I think this structure mostly needs to go away. gconf schemae ought to save us --- terminator | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/terminator b/terminator index d99850d4..8f54bc97 100755 --- a/terminator +++ b/terminator @@ -61,18 +61,14 @@ class TerminatorTerm: 'link_hostchars' : '-A-Za-z0-9', 'link_userchars' : '-A-Za-z0-9', 'link_passchars' : '-A-Za-z0-9,?;.:/!%$^*&~"#\'', - 'palette' : '/apps/gnome-terminal/profiles/Default/palette', + '_palette' : '%s/palette', } matches = {} - def __init__ (self, term, profile, settings = {}): + def __init__ (self, term, profile): self.defaults['link_user'] = self.defaults['_link_user']%(self.defaults['link_userchars'], self.defaults['link_passchars']) - # Set up any overridden settings - for key in settings.keys (): - defaults[key] = settings[key] - self.term = term self.gconf_client = gconf.client_get_default () @@ -87,6 +83,8 @@ class TerminatorTerm: # FIXME: This absolutely should not be an exit, the terminal should fail to spawn. If they all fail, it should exit from the mainloop or something. sys.exit (2) + self.defaults['palette'] = self.defaults['_palette']%(self.profile) + self.gconf_client.add_dir (self.profile, gconf.CLIENT_PRELOAD_RECURSIVE) self.gconf_client.add_dir ('/apps/metacity/general', gconf.CLIENT_PRELOAD_RECURSIVE)