Fix some minor quirks and improve the bell setting code, removing a FIXME
This commit is contained in:
parent
56003531c3
commit
4930e42729
15
terminator
15
terminator
|
@ -63,7 +63,7 @@ class TerminatorTerm:
|
||||||
'gt_dir' : '/apps/gnome-terminal',
|
'gt_dir' : '/apps/gnome-terminal',
|
||||||
'_profile_dir' : '%s/profiles',
|
'_profile_dir' : '%s/profiles',
|
||||||
'allow_bold' : True,
|
'allow_bold' : True,
|
||||||
'audible_bell' : False,
|
'silent_bell' : True,
|
||||||
'background_color' : '#000000',
|
'background_color' : '#000000',
|
||||||
'background_darkness' : 0.5,
|
'background_darkness' : 0.5,
|
||||||
'background_type' : 'solid',
|
'background_type' : 'solid',
|
||||||
|
@ -79,7 +79,6 @@ class TerminatorTerm:
|
||||||
'scroll_on_output' : False,
|
'scroll_on_output' : False,
|
||||||
'scrollback_lines' : 100,
|
'scrollback_lines' : 100,
|
||||||
'focus' : 'sloppy',
|
'focus' : 'sloppy',
|
||||||
'visible_bell' : False,
|
|
||||||
'child_restart' : False,
|
'child_restart' : False,
|
||||||
'link_scheme' : '(news|telnet|nttp|file|http|ftp|https)',
|
'link_scheme' : '(news|telnet|nttp|file|http|ftp|https)',
|
||||||
'_link_user' : '[%s]+(:[%s]+)?',
|
'_link_user' : '[%s]+(:[%s]+)?',
|
||||||
|
@ -94,7 +93,7 @@ class TerminatorTerm:
|
||||||
|
|
||||||
matches = {}
|
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['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'])
|
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 ()
|
ret = value.get_bool ()
|
||||||
|
|
||||||
if ret == None:
|
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)
|
sys.exit (1)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
@ -295,9 +294,9 @@ class TerminatorTerm:
|
||||||
self._vte.set_cursor_blinks = (self.reconf ('cursor_blink'))
|
self._vte.set_cursor_blinks = (self.reconf ('cursor_blink'))
|
||||||
|
|
||||||
# Set our audible belliness
|
# 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
|
silent_bell = self.reconf ('silent_bell')
|
||||||
self._vte.set_audible_bell = not (self.gconf_client.get_bool (self.profile + "/silent_bell") or self.defaults['audible_bell'])
|
self._vte.set_audible_bell = not silent_bell
|
||||||
self._vte.set_visible_bell (self.defaults['visible_bell'])
|
self._vte.set_visible_bell = silent_bell
|
||||||
|
|
||||||
# Set our scrolliness
|
# Set our scrolliness
|
||||||
self._vte.set_scrollback_lines (self.reconf ('scrollback_lines'))
|
self._vte.set_scrollback_lines (self.reconf ('scrollback_lines'))
|
||||||
|
@ -673,7 +672,7 @@ class Terminator:
|
||||||
|
|
||||||
if not sibling:
|
if not sibling:
|
||||||
# something is wrong, give up
|
# 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
|
return
|
||||||
|
|
||||||
self.term_list.remove (widget)
|
self.term_list.remove (widget)
|
||||||
|
|
Loading…
Reference in New Issue