From e86dd8859b90a52762b0ea44606f063cbc45ec0a Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Fri, 25 Oct 2013 16:55:26 +0200 Subject: [PATCH] Fixes splits not being central mith multiple tabs (Justin Ossevoort). Closes LP#1186953 --- terminatorlib/notebook.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 4863fa99..d9ba9018 100755 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -142,6 +142,8 @@ class Notebook(Container, gtk.Notebook): else: container = maker.make('hpaned') + self.get_toplevel().set_pos_by_ratio = True + if not sibling: sibling = maker.make('terminal') sibling.set_cwd(cwd) @@ -167,6 +169,10 @@ class Notebook(Container, gtk.Notebook): self.show_all() terminal.grab_focus() + while gtk.events_pending(): + gtk.main_iteration_do(False) + self.get_toplevel().set_pos_by_ratio = False + def add(self, widget, metadata=None): """Add a widget to the container""" dbg('adding a new tab')