Only spawn a child in the sibling if we created it

This commit is contained in:
Chris Jones 2010-02-04 00:59:11 +00:00
parent 1aadbae30b
commit 15ea22b4ff
3 changed files with 3 additions and 4 deletions

View File

@ -70,7 +70,7 @@ class Notebook(Container, gtk.Notebook):
if not sibling: if not sibling:
sibling = maker.make('terminal') sibling = maker.make('terminal')
sibling.spawn_child() sibling.spawn_child()
self.insert_page(container, None, page_num) self.insert_page(container, None, page_num)
self.set_tab_label(container, label) self.set_tab_label(container, label)

View File

@ -52,7 +52,7 @@ class Paned(Container):
if not sibling: if not sibling:
sibling = maker.make('terminal') sibling = maker.make('terminal')
sibling.spawn_child() sibling.spawn_child()
self.add(container) self.add(container)
self.show_all() self.show_all()

View File

@ -299,6 +299,7 @@ class Window(Container, gtk.Window):
if not sibling: if not sibling:
sibling = maker.make('Terminal') sibling = maker.make('Terminal')
sibling.spawn_child()
self.add(container) self.add(container)
container.show_all() container.show_all()
@ -306,8 +307,6 @@ class Window(Container, gtk.Window):
container.add(term) container.add(term)
container.show_all() container.show_all()
sibling.spawn_child()
def zoom(self, widget, font_scale=True): def zoom(self, widget, font_scale=True):
"""Zoom a terminal widget""" """Zoom a terminal widget"""
children = self.get_children() children = self.get_children()