From e071ad23cfb44dc975efcda9ca45175a79c12d33 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Wed, 4 Sep 2013 22:59:27 +0200 Subject: [PATCH] Add maximised and fullscreen status to saved layouts. --- terminatorlib/container.py | 5 +++++ terminatorlib/terminator.py | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/terminatorlib/container.py b/terminatorlib/container.py index fba84fa4..d908dbb1 100755 --- a/terminatorlib/container.py +++ b/terminatorlib/container.py @@ -257,6 +257,11 @@ the %s will also close all terminals within it.') % (reqtype, reqtype)) position = ':'.join([str(x) for x in position]) layout['position'] = position + if hasattr(self, 'ismaximised'): + layout['maximised'] = self.ismaximised + + if hasattr(self, 'isfullscreen'): + layout['fullscreen'] = self.isfullscreen if hasattr(self, 'ratio'): layout['ratio'] = self.ratio diff --git a/terminatorlib/terminator.py b/terminatorlib/terminator.py index 831bd094..f66e0602 100755 --- a/terminatorlib/terminator.py +++ b/terminatorlib/terminator.py @@ -274,6 +274,18 @@ class Terminator(Borg): window.resize(winx, winy) if layout[windef].has_key('title'): window.title.force_title(layout[windef]['title']) + if layout[windef].has_key('maximised'): + if layout[windef]['maximised'] == 'True': + window.ismaximised = True + else: + window.ismaximised = False + window.set_maximised(window.ismaximised) + if layout[windef].has_key('fullscreen'): + if layout[windef]['fullscreen'] == 'True': + window.isfullscreen = True + else: + window.isfullscreen = False + window.set_fullscreen(window.isfullscreen) window.create_layout(layout[windef]) def layout_done(self):