Don't create a one-off TabLabel for the first tab, Notebook.newtab() makes them and now the order of creation is fixed they even show up properly

This commit is contained in:
Chris Jones 2009-12-07 20:32:47 +00:00
parent ced0e4f3f5
commit 0796e70808
1 changed files with 1 additions and 8 deletions

View File

@ -37,12 +37,6 @@ class Notebook(Container, gtk.Notebook):
window.add(self) window.add(self)
self.newtab(child) self.newtab(child)
label = TabLabel(self.window.get_title(), self)
self.set_tab_label(child, label)
self.set_tab_label_packing(child, not self.config['scroll_tabbar'],
not self.config['scroll_tabbar'],
gtk.PACK_START)
self.show_all() self.show_all()
def configure(self): def configure(self):
@ -123,13 +117,12 @@ class Notebook(Container, gtk.Notebook):
label.show_all() label.show_all()
widget.show_all() widget.show_all()
self.append_page(widget, None)
self.set_tab_label(widget, label) self.set_tab_label(widget, label)
self.set_tab_label_packing(widget, not self.config['scroll_tabbar'], self.set_tab_label_packing(widget, not self.config['scroll_tabbar'],
not self.config['scroll_tabbar'], not self.config['scroll_tabbar'],
gtk.PACK_START) gtk.PACK_START)
self.append_page(widget, None)
self.set_current_page(-1) self.set_current_page(-1)
widget.grab_focus() widget.grab_focus()