From 28eeb0e14d10df4de9ea950d79962b017315b367 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sun, 6 Jan 2008 03:23:26 +0000 Subject: [PATCH] Support profile settings for terminal backgrounds. Closes LP #180717 --- ChangeLog | 1 + terminator | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6e41b1c2..469c6ebb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ terminator 0.7: * Font zooming support. Closes LP #178792 * Set the VTE widget to have a tooltip of its window title. This may be reverted if it is annoying + * Support GNOME Terminal profile settings for backgrounds. Closes LP #180717 terminator 0.6: diff --git a/terminator b/terminator index c5125717..462af7db 100755 --- a/terminator +++ b/terminator @@ -62,8 +62,9 @@ class TerminatorTerm: '_profile_dir' : '%s/profiles', 'allow_bold' : True, 'audible_bell' : False, - 'background' : None, 'background_color' : '#000000', + 'background_darkness' : 0.5, + 'background_type' : 'solid', 'backspace_binding' : 'ascii-del', 'delete_binding' : 'delete-sequence', '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']) 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 (':') palette = [] for color in colors: