Fix up titlebar related actions now the widget is called titlebox
This commit is contained in:
parent
94302d9fbe
commit
5ea8776fce
22
terminator
22
terminator
|
@ -441,16 +441,20 @@ class TerminatorTerm:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def do_scrollbar_toggle (self):
|
def do_scrollbar_toggle (self):
|
||||||
if self._scrollbar.get_property ('visible'):
|
self.toggle_widget_visibility (self._scrollbar)
|
||||||
self._scrollbar.hide ()
|
|
||||||
else:
|
|
||||||
self._scrollbar.show ()
|
|
||||||
|
|
||||||
def do_title_toggle (self):
|
def do_title_toggle (self):
|
||||||
if self._title.get_property ('visible'):
|
self.toggle_widget_visibility (self._titlebox)
|
||||||
self._title.hide ()
|
|
||||||
|
def toggle_widget_visibility (self, widget):
|
||||||
|
if not isinstance (widget, gtk.Widget):
|
||||||
|
raise TypeError
|
||||||
|
|
||||||
|
if widget.get_property ('visible'):
|
||||||
|
widget.hide ()
|
||||||
else:
|
else:
|
||||||
self._title.show ()
|
widget.show ()
|
||||||
|
|
||||||
#keybindings for the individual splited terminals (affects only the
|
#keybindings for the individual splited terminals (affects only the
|
||||||
#the selected terminal)
|
#the selected terminal)
|
||||||
def on_vte_key_press (self, term, event):
|
def on_vte_key_press (self, term, event):
|
||||||
|
@ -577,8 +581,8 @@ class TerminatorTerm:
|
||||||
item.connect ("toggled", lambda menu_item: self.do_scrollbar_toggle ())
|
item.connect ("toggled", lambda menu_item: self.do_scrollbar_toggle ())
|
||||||
menu.append (item)
|
menu.append (item)
|
||||||
|
|
||||||
item = gtk.CheckMenuItem (_("Show Title"))
|
item = gtk.CheckMenuItem (_("Show _titlebar"))
|
||||||
item.set_active (self._title.get_property ('visible'))
|
item.set_active (self._titlebox.get_property ('visible'))
|
||||||
item.connect ("toggled", lambda menu_item: self.do_title_toggle ())
|
item.connect ("toggled", lambda menu_item: self.do_title_toggle ())
|
||||||
menu.append (item)
|
menu.append (item)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue