From 049582453a9af046fc34c9b3c51cf925bf181896 Mon Sep 17 00:00:00 2001 From: Emmanuel Bretelle Date: Mon, 26 May 2008 23:50:23 +0100 Subject: [PATCH] Fix bug where titlebars was not appearing when: 1 - Open up Terminator (im running Bzr revision 297), the orange titlebar in the terminal wont be open 2 - Open up a new terminal (Ctrl+Shift+E) 3 - An orange titlebar will be in the top of the newly spawned terminal, but there wont be one in the original,initial terminal Fixes LP#235083 --- terminator | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/terminator b/terminator index bc63191e..f0a10f1d 100755 --- a/terminator +++ b/terminator @@ -126,7 +126,7 @@ class TerminatorTerm (gtk.VBox): self.pack_start(self._titlebox, False) self.pack_start(self._termbox) - if self.conf.titlebars and len(self.terminator.term_list)>0: + if self.conf.titlebars: self._titlebox.show() else: self._titlebox.hide() @@ -896,6 +896,7 @@ class Terminator: self.term_list = [term] self.window.add (term) + term._titlebox.hide() self.window.show () term.spawn_child () @@ -1006,11 +1007,15 @@ class Terminator: position = (vertical) and parent.allocation.height \ or parent.allocation.width + if (isinstance (parent, gtk.Notebook) or isinstance (parent, gtk.Window)) \ + and \ + widget.conf.titlebars: + #not the only term in the notebook/window anymore, need to reshow the title + widget._titlebox.show() + if isinstance (parent, gtk.Notebook): page = -1 - #not the only term in the notebook anymore, need to reshow the title - if widget.conf.titlebars: - widget._titlebox.show() + for i in range(0, parent.get_n_pages()): if parent.get_nth_page(i) == widget: page = i @@ -1061,13 +1066,13 @@ class Terminator: pane.show () pane.set_position (position / 2) terminal.show () + # insert the term reference into the list index = self.term_list.index (widget) if pos in ('bottom', 'right'): index = index + 1 self.term_list.insert (index, terminal) - # make the new terminal grab the focus terminal._vte.grab_focus ()