Layouts remember which tab was active now.

This commit is contained in:
Stephen Boddy 2013-09-05 00:50:12 +02:00
parent e0a90ab670
commit 25754d3ab5
2 changed files with 6 additions and 0 deletions

View File

@ -277,6 +277,7 @@ the %s will also close all terminals within it.') % (reqtype, reqtype))
page = self.get_nth_page(tabnum)
label = self.get_tab_label(page)
labels.append(label.get_custom_label())
layout['active_page'] = self.get_current_page()
if len(labels) > 0:
layout['labels'] = labels

View File

@ -119,6 +119,11 @@ class Notebook(Container, gtk.Notebook):
page.create_layout(children[child_key])
num = num + 1
if layout.has_key('active_page'):
self.set_current_page(int(layout['active_page']))
else:
self.set_current_page(0)
def split_axis(self, widget, vertical=True, cwd=None, sibling=None, widgetfirst=True):
"""Split the axis of a terminal inside us"""
dbg('called for widget: %s' % widget)