Support profile settings for terminal backgrounds. Closes LP #180717

This commit is contained in:
Chris Jones 2008-01-06 03:23:26 +00:00
parent fd2d642242
commit 28eeb0e14d
2 changed files with 16 additions and 1 deletions

View File

@ -14,6 +14,7 @@ terminator 0.7:
* Font zooming support. Closes LP #178792 * Font zooming support. Closes LP #178792
* Set the VTE widget to have a tooltip of its window title. This may be * Set the VTE widget to have a tooltip of its window title. This may be
reverted if it is annoying reverted if it is annoying
* Support GNOME Terminal profile settings for backgrounds. Closes LP #180717
terminator 0.6: terminator 0.6:

View File

@ -62,8 +62,9 @@ class TerminatorTerm:
'_profile_dir' : '%s/profiles', '_profile_dir' : '%s/profiles',
'allow_bold' : True, 'allow_bold' : True,
'audible_bell' : False, 'audible_bell' : False,
'background' : None,
'background_color' : '#000000', 'background_color' : '#000000',
'background_darkness' : 0.5,
'background_type' : 'solid',
'backspace_binding' : 'ascii-del', 'backspace_binding' : 'ascii-del',
'delete_binding' : 'delete-sequence', 'delete_binding' : 'delete-sequence',
'cursor_blinks' : False, 'cursor_blinks' : False,
@ -221,6 +222,19 @@ class TerminatorTerm:
fg_color = gtk.gdk.color_parse (self.gconf_client.get_string (self.profile + "/foreground_color") or self.defaults['foreground_color']) fg_color = gtk.gdk.color_parse (self.gconf_client.get_string (self.profile + "/foreground_color") or self.defaults['foreground_color'])
bg_color = gtk.gdk.color_parse (self.gconf_client.get_string (self.profile + "/background_color") or self.defaults['background_color']) bg_color = gtk.gdk.color_parse (self.gconf_client.get_string (self.profile + "/background_color") or self.defaults['background_color'])
# Set our background image, transparency and type
background_type = self.gconf_client.get_string (self.profile + "/background_type") or self.defaults['background_type']
if background_type == "solid":
self._vte.set_background_image_file ('')
self._vte.set_background_transparent (False)
if background_type == "image":
self._vte.set_background_image_file (self.gconf_client.get_string (self.profile + "/background_image") or self.defaults['background_image'])
self._vte.set_background_transparent (False)
if background_type == "transparent":
self._vte.set_background_transparent (True)
self._vte.set_background_saturation (self.gconf_client.get_float (self.profile + "/background_darkness") or self.defaults['background_darkness'])
colors = palette.split (':') colors = palette.split (':')
palette = [] palette = []
for color in colors: for color in colors: