diff --git a/terminatorlib/container.py b/terminatorlib/container.py index d908dbb1..a581f225 100755 --- a/terminatorlib/container.py +++ b/terminatorlib/container.py @@ -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 diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 7af94c25..4863fa99 100755 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -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)