Fixes splits not being central mith multiple tabs (Justin Ossevoort). Closes LP#1186953

This commit is contained in:
Stephen Boddy 2013-10-25 16:55:26 +02:00
parent 361f7d5d5f
commit e86dd8859b
1 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,8 @@ class Notebook(Container, gtk.Notebook):
else: else:
container = maker.make('hpaned') container = maker.make('hpaned')
self.get_toplevel().set_pos_by_ratio = True
if not sibling: if not sibling:
sibling = maker.make('terminal') sibling = maker.make('terminal')
sibling.set_cwd(cwd) sibling.set_cwd(cwd)
@ -167,6 +169,10 @@ class Notebook(Container, gtk.Notebook):
self.show_all() self.show_all()
terminal.grab_focus() 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): def add(self, widget, metadata=None):
"""Add a widget to the container""" """Add a widget to the container"""
dbg('adding a new tab') dbg('adding a new tab')