Fix the problem with tabs not being named where a window with splits creates a new tab
This commit is contained in:
parent
15ce5a9a9e
commit
5011ba1bc8
|
@ -283,18 +283,23 @@ class Notebook(Container, gtk.Notebook):
|
||||||
|
|
||||||
dbg('inserting page at position: %s' % tabpos)
|
dbg('inserting page at position: %s' % tabpos)
|
||||||
self.insert_page(widget, None, tabpos)
|
self.insert_page(widget, None, tabpos)
|
||||||
child_widgets = [widget]
|
|
||||||
child_widgets .extend(enumerate_descendants(widget))
|
if maker.isinstance(widget, 'Terminal'):
|
||||||
|
containers, objects = ([], [widget])
|
||||||
|
else:
|
||||||
|
containers, objects = enumerate_descendants(widget)
|
||||||
|
|
||||||
term_widget = None
|
term_widget = None
|
||||||
for term_widget in child_widgets:
|
for term_widget in objects:
|
||||||
if maker.isinstance(term_widget, 'Terminal'):
|
if maker.isinstance(term_widget, 'Terminal'):
|
||||||
self.set_last_active_term(term_widget.uuid)
|
self.set_last_active_term(term_widget.uuid)
|
||||||
self.set_tab_label(term_widget, label)
|
|
||||||
self.set_tab_label_packing(term_widget, not self.config['scroll_tabbar'],
|
|
||||||
not self.config['scroll_tabbar'],
|
|
||||||
gtk.PACK_START)
|
|
||||||
break
|
break
|
||||||
|
|
||||||
|
self.set_tab_label(widget, label)
|
||||||
|
self.set_tab_label_packing(term_widget, not self.config['scroll_tabbar'],
|
||||||
|
not self.config['scroll_tabbar'],
|
||||||
|
gtk.PACK_START)
|
||||||
|
|
||||||
self.set_tab_reorderable(widget, True)
|
self.set_tab_reorderable(widget, True)
|
||||||
self.set_current_page(tabpos)
|
self.set_current_page(tabpos)
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
Loading…
Reference in New Issue