Add maximised and fullscreen status to saved layouts.

This commit is contained in:
Stephen Boddy 2013-09-04 22:59:27 +02:00
parent ce19e7f7ad
commit e071ad23cf
2 changed files with 17 additions and 0 deletions

View File

@ -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

View File

@ -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):