really fixed this time :)
bool('False') is True, therefore we can't just use bool(value) but we need assign a True or False value when reading terminatorrc if value is "True" or "False"
This commit is contained in:
parent
92ce9fe4b3
commit
679518b288
21
terminator
21
terminator
|
@ -161,6 +161,11 @@ class TerminatorTerm:
|
||||||
elif line:
|
elif line:
|
||||||
(key,value) = line.split ("=")
|
(key,value) = line.split ("=")
|
||||||
print >> sys.stderr, _('''Overriding setting '%s' from value '%s' to: '%s' ''')%(key.strip (), self.defaults[key.strip ()], value.strip ())
|
print >> sys.stderr, _('''Overriding setting '%s' from value '%s' to: '%s' ''')%(key.strip (), self.defaults[key.strip ()], value.strip ())
|
||||||
|
if value.strip() == "True":
|
||||||
|
self.defaults[key.strip ()] = True
|
||||||
|
elif value.strip() == "False":
|
||||||
|
self.defaults[key.strip ()] = False
|
||||||
|
else:
|
||||||
self.defaults[key.strip ()] = value.strip ()
|
self.defaults[key.strip ()] = value.strip ()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
@ -180,16 +185,14 @@ class TerminatorTerm:
|
||||||
self._termbox = gtk.HBox ()
|
self._termbox = gtk.HBox ()
|
||||||
self._termbox.show()
|
self._termbox.show()
|
||||||
self._title = gtk.Label()
|
self._title = gtk.Label()
|
||||||
self._title.show()
|
|
||||||
self._box = gtk.VBox ()
|
self._box = gtk.VBox ()
|
||||||
self._box.show()
|
self._box.show()
|
||||||
self._box.pack_start(self._title, False)
|
self._box.pack_start(self._title, False)
|
||||||
self._box.pack_start(self._termbox)
|
self._box.pack_start(self._termbox)
|
||||||
|
if self.reconf('titlebars'):
|
||||||
if bool(self.reconf('titlebars')):
|
|
||||||
self._title.hide()
|
|
||||||
else:
|
|
||||||
self._title.show()
|
self._title.show()
|
||||||
|
else:
|
||||||
|
self._title.hide()
|
||||||
|
|
||||||
self._scrollbar = gtk.VScrollbar (self._vte.get_adjustment ())
|
self._scrollbar = gtk.VScrollbar (self._vte.get_adjustment ())
|
||||||
if self.scrollbar_position != "hidden" and self.scrollbar_position != "disabled":
|
if self.scrollbar_position != "hidden" and self.scrollbar_position != "disabled":
|
||||||
|
@ -594,20 +597,20 @@ class TerminatorTerm:
|
||||||
return menu
|
return menu
|
||||||
|
|
||||||
def on_vte_title_change(self, vte):
|
def on_vte_title_change(self, vte):
|
||||||
if bool(self.reconf ('titletips')):
|
if self.reconf ('titletips'):
|
||||||
vte.set_property ("has-tooltip", True)
|
vte.set_property ("has-tooltip", True)
|
||||||
vte.set_property ("tooltip-text", vte.get_window_title ())
|
vte.set_property ("tooltip-text", vte.get_window_title ())
|
||||||
#set the title anyhow, titlebars setting only show/hide the label
|
#set the title anyhow, titlebars setting only show/hide the label
|
||||||
self._title.set_text(vte.get_window_title ())
|
self._title.set_text(vte.get_window_title ())
|
||||||
self.terminator.set_window_title("Terminator: %s" %vte.get_window_title ())
|
self.terminator.set_window_title("Terminator: %s" %vte.get_window_title ())
|
||||||
|
|
||||||
def get_box (self):
|
|
||||||
return self._box
|
|
||||||
|
|
||||||
def on_vte_focus(self, vte):
|
def on_vte_focus(self, vte):
|
||||||
if vte.get_window_title ():
|
if vte.get_window_title ():
|
||||||
self.terminator.set_window_title("Terminator: %s" %vte.get_window_title ())
|
self.terminator.set_window_title("Terminator: %s" %vte.get_window_title ())
|
||||||
|
|
||||||
|
def get_box (self):
|
||||||
|
return self._box
|
||||||
|
|
||||||
class Terminator:
|
class Terminator:
|
||||||
def __init__ (self, profile, command = None, fullscreen = False, maximise = False, borderless = False):
|
def __init__ (self, profile, command = None, fullscreen = False, maximise = False, borderless = False):
|
||||||
self.profile = profile
|
self.profile = profile
|
||||||
|
|
Loading…
Reference in New Issue