Make prefs_profile.auto_add more robust, add some more global reconfiguration

This commit is contained in:
Chris Jones 2008-11-16 02:42:09 +00:00
parent 2ccd5962c1
commit 68529502e7
2 changed files with 34 additions and 5 deletions

View File

@ -169,6 +169,7 @@ class ProfileEditor:
filter.add_mime_type ('image/*')
widget.add_filter (filter)
widget.set_local_only (True)
if value:
widget.set_filename (value)
elif key == 'tab_position':
widget = gtk.combo_box_new_text()
@ -268,6 +269,24 @@ class ProfileEditor:
for changer in changed:
if changer == "fullscreen":
self.term.fullscreen_absolute(values[changer])
elif changer == "maximise":
if values[changer]:
self.term.maximize()
else:
self.term.unmaximize()
elif changer == "enable_real_transparency":
#self.term.enable_rgba(values[changer])
# FIXME: This breaks if the window is realised
pass
elif changer == "borderless":
self.term.window.set_decorated (not values[changer])
elif changer == "handle_size":
# FIXME: How maek work?
pass
elif changer == "tab_position":
# FIXME: maek work
pass
# FIXME: which others? cycle_term_tab, close_button_on_tab, copy_on_selection, extreme_tabs, try_posix_regexp
self.term.reconfigure_vtes()

View File

@ -236,10 +236,7 @@ class Terminator:
# Set RGBA colormap if possible so VTE can use real alpha
# channels for transparency.
if self.conf.enable_real_transparency:
screen = self.window.get_screen()
colormap = screen.get_rgba_colormap()
if colormap:
self.window.set_colormap(colormap)
self.rgba_control(True)
# Start out with just one terminal
# FIXME: This should be really be decided from some kind of profile
@ -252,6 +249,15 @@ class Terminator:
term.spawn_child ()
self.save_yourself ()
def enable_rgba (self, rgba = False):
screen = self.window.get_screen()
if rgba:
colormap = screen.get_rgba_colormap()
else:
colormap = screen.get_rgb_colormap()
if colormap:
self.window.set_colormap(colormap)
def die(self, *args):
gtk.main_quit ()
@ -305,6 +311,10 @@ class Terminator:
""" Maximize the Terminator window."""
self.window.maximize ()
def unmaximize (self):
""" Unmaximize the Terminator window."""
self.window.unmaximize ()
def fullscreen_toggle (self):
""" Toggle the fullscreen state of the window. If it is in
fullscreen state, it will be unfullscreened. If it is not, it