From 4930e42729da74752618054279b0471c31edefea Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 12 Feb 2008 23:11:04 +0000 Subject: [PATCH] Fix some minor quirks and improve the bell setting code, removing a FIXME --- terminator | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/terminator b/terminator index 158e5655..1345eed1 100755 --- a/terminator +++ b/terminator @@ -63,7 +63,7 @@ class TerminatorTerm: 'gt_dir' : '/apps/gnome-terminal', '_profile_dir' : '%s/profiles', 'allow_bold' : True, - 'audible_bell' : False, + 'silent_bell' : True, 'background_color' : '#000000', 'background_darkness' : 0.5, 'background_type' : 'solid', @@ -79,7 +79,6 @@ class TerminatorTerm: 'scroll_on_output' : False, 'scrollback_lines' : 100, 'focus' : 'sloppy', - 'visible_bell' : False, 'child_restart' : False, 'link_scheme' : '(news|telnet|nttp|file|http|ftp|https)', '_link_user' : '[%s]+(:[%s]+)?', @@ -94,7 +93,7 @@ class TerminatorTerm: matches = {} - def __init__ (self, terminator, profile, command = None): + def __init__ (self, terminator, profile = None, command = None): self.defaults['profile_dir'] = self.defaults['_profile_dir']%(self.defaults['gt_dir']) self.defaults['link_user'] = self.defaults['_link_user']%(self.defaults['link_userchars'], self.defaults['link_passchars']) @@ -210,7 +209,7 @@ class TerminatorTerm: ret = value.get_bool () if ret == None: - print _('Unknown value requested. Unable to find in gconf profile or default settings: ') + property + print >> sys.stderr, _('Unknown value requested. Unable to find in gconf profile or default settings: ') + property sys.exit (1) return ret @@ -295,9 +294,9 @@ class TerminatorTerm: self._vte.set_cursor_blinks = (self.reconf ('cursor_blink')) # Set our audible belliness - # FIXME: What on earth are we doing here. We should match the profile setting name and try not to set things this way - self._vte.set_audible_bell = not (self.gconf_client.get_bool (self.profile + "/silent_bell") or self.defaults['audible_bell']) - self._vte.set_visible_bell (self.defaults['visible_bell']) + silent_bell = self.reconf ('silent_bell') + self._vte.set_audible_bell = not silent_bell + self._vte.set_visible_bell = silent_bell # Set our scrolliness self._vte.set_scrollback_lines (self.reconf ('scrollback_lines')) @@ -673,7 +672,7 @@ class Terminator: if not sibling: # something is wrong, give up - print "Error: %s is not a child of %s"%(widget, parent) + print >> sys.stderr, "Error: %s is not a child of %s"%(widget, parent) return self.term_list.remove (widget)