diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 80d5745e..077604f0 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -1248,6 +1248,7 @@ class Terminator: widget._titlebox.show() widget._vte.grab_focus() + widget._titlebox.update() def zoom_term (self, widget, fontscale = False): """Maximize to full window an instance of TerminatorTerm.""" diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 14c55eff..20517afc 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -48,6 +48,7 @@ class TerminatorTermTitle (gtk.EventBox): _hbox = None _icon = None _parent = None + _unzoomed_title = None def __init__ (self, configwanted = False): gtk.EventBox.__init__ (self) @@ -83,6 +84,10 @@ class TerminatorTermTitle (gtk.EventBox): """Set the text shown in the titlebar""" self._title.set_text (name) + def get_terminal_title (self): + """Return the text showin in the titlebar""" + return (self._title.get_text ()) + def set_background_color (self, color): """Set the background color of the titlebar""" self.modify_bg (gtk.STATE_NORMAL, color) @@ -105,6 +110,16 @@ class TerminatorTermTitle (gtk.EventBox): if not self._parent: self._parent = self.get_parent () + if self._parent.terminator._zoomed and len (self._parent.terminator.term_list): + self._unzoomed_title = self.get_terminal_title () + self.set_terminal_title ("Zoomed terminal, %d hidden" % (len (self._parent.terminator.term_list) - 1)) + self.show() + return + else: + if self._unzoomed_title: + self.set_terminal_title (self._unzoomed_title) + self._unzoomed_title = None + if isinstance (self._parent.get_parent (), gtk.Window): self.hide() return