Demonstrate how we can change a global property without a restart
This commit is contained in:
parent
a068372228
commit
e01d69346f
@ -245,11 +245,12 @@ class ProfileEditor:
|
||||
value = ':'.join (valuebits)
|
||||
else:
|
||||
value = None
|
||||
err("skipping unknown thingy: %s" % property)
|
||||
err("skipping unknown property: %s" % property)
|
||||
|
||||
values[property] = value
|
||||
|
||||
has_changed = False
|
||||
changed = []
|
||||
for source in self.term.conf.sources:
|
||||
if isinstance (source, TerminatorConfValuestoreRC):
|
||||
for property in values:
|
||||
@ -258,9 +259,14 @@ class ProfileEditor:
|
||||
print "%s changed from %s to %s" % (property, self.source_get_value(property), values[property])
|
||||
source.values[property] = values[property]
|
||||
has_changed = True
|
||||
changed.append(property)
|
||||
except KeyError:
|
||||
pass
|
||||
if has_changed:
|
||||
for changer in changed:
|
||||
if changer == "fullscreen":
|
||||
self.term.fullscreen_absolute(values[changer])
|
||||
|
||||
self.term.reconfigure_vtes()
|
||||
|
||||
def cancel (self, data):
|
||||
|
@ -315,6 +315,12 @@ class Terminator:
|
||||
else:
|
||||
self.window.fullscreen ()
|
||||
|
||||
def fullscreen_absolute (self, fullscreen):
|
||||
""" Explicitly set the fullscreen state of the window.
|
||||
"""
|
||||
if self._fullscreen != fullscreen:
|
||||
self.fullscreen_toggle ()
|
||||
|
||||
def on_window_state_changed (self, window, event):
|
||||
self._fullscreen = bool (event.new_window_state & gtk.gdk.WINDOW_STATE_FULLSCREEN)
|
||||
self._maximised = bool (event.new_window_state & gtk.gdk.WINDOW_STATE_MAXIMIZED)
|
||||
|
Loading…
Reference in New Issue
Block a user