Layouts remember which tab was active now.
This commit is contained in:
parent
e0a90ab670
commit
25754d3ab5
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user