From e66a522555c34ca2ff3f3a0e24c106e7598fb4f8 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Fri, 15 Nov 2013 13:21:24 +0100 Subject: [PATCH] Cleanup the describe_layout labels code to make some future changes easier to add in seperate commits --- terminatorlib/container.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terminatorlib/container.py b/terminatorlib/container.py index aabd454a..0c47e933 100755 --- a/terminatorlib/container.py +++ b/terminatorlib/container.py @@ -263,6 +263,7 @@ the %s will also close all terminals within it.') % (reqtype, reqtype)) if hasattr(self, 'isfullscreen'): layout['fullscreen'] = self.isfullscreen + if hasattr(self, 'ratio'): layout['ratio'] = self.ratio @@ -272,16 +273,15 @@ the %s will also close all terminals within it.') % (reqtype, reqtype)) if hasattr(self, 'title'): layout['title'] = self.title.text - labels = [] if mytype == 'Notebook': + labels = [] for tabnum in xrange(0, self.get_n_pages()): 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 - + layout['active_page'] = self.get_current_page() + if mytype == 'Window': if self.uuid == self.terminator.last_active_window: layout['last_active_window'] = True