From ad5c927d15696d859c9bae96a557891022e4e36b Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 8 Feb 2010 20:22:08 +0000 Subject: [PATCH] Add a section to the global config for setting the various fg/bg colours of the titlebars --- terminatorlib/config.py | 12 +- terminatorlib/preferences.glade | 551 ++++++++++++++++++++++---------- terminatorlib/prefseditor.py | 12 + 3 files changed, 399 insertions(+), 176 deletions(-) diff --git a/terminatorlib/config.py b/terminatorlib/config.py index eeda7c35..57b29778 100755 --- a/terminatorlib/config.py +++ b/terminatorlib/config.py @@ -87,12 +87,12 @@ DEFAULTS = { 'hide_tabbar' : False, 'scroll_tabbar' : False, 'try_posix_regexp' : platform.system() != 'Linux', - 'title_transmit_fg_color' : '#ffffff', - 'title_transmit_bg_color' : '#c80003', - 'title_receive_fg_color' : '#ffffff', - 'title_receive_bg_color' : '#0076c9', - 'title_inactive_fg_color' : '#000000', - 'title_inactive_bg_color' : '#c0bebf', + 'title_transmit_fg_color' : '#ffffffffffff', + 'title_transmit_bg_color' : '#c8c800000303', + 'title_receive_fg_color' : '#ffffffffffff', + 'title_receive_bg_color' : '#00007676c9c9', + 'title_inactive_fg_color' : '#000000000000', + 'title_inactive_bg_color' : '#c0c0bebebfbf', 'disabled_plugins' : ['TestPlugin', 'CustomCommandsMenu'], }, 'keybindings': { diff --git a/terminatorlib/preferences.glade b/terminatorlib/preferences.glade index 508e8f73..13e4fa75 100644 --- a/terminatorlib/preferences.glade +++ b/terminatorlib/preferences.glade @@ -236,191 +236,402 @@ True 6 - + True - 6 - 2 - 6 + vertical + 18 - + True - Window geometry hints - - - 2 - 3 - - - - - - - True - True - False - True - True - - - 1 - 2 - 2 - 3 - - GTK_EXPAND - - - - - True - Window state - - - 3 - 4 - - - - - - - True - WindowStateListStore - 0 + 6 + 2 + 6 - - - 0 - + + True + Window geometry hints + + + 2 + 3 + + + + + + + True + True + False + True + True + + + 1 + 2 + 2 + 3 + + GTK_EXPAND + + + + + True + Window state + + + 3 + 4 + + + + + + + True + WindowStateListStore + 0 + + + + 0 + + + + + 1 + 2 + 3 + 4 + + GTK_EXPAND + + + + + True + Window borders + + + 4 + 5 + + + + + + + True + True + False + True + True + + + 1 + 2 + 4 + 5 + + GTK_EXPAND + + + + + True + Tab position + + + 5 + 6 + + + + + + + True + TabPositionListStore + 0 + + + + 0 + + + + + 1 + 2 + 5 + 6 + + GTK_EXPAND + + + + + True + Mouse focus + + + + + + + + + True + FocusListStore + 0 + + + + 0 + + + + + 1 + 2 + + GTK_EXPAND + + + + + True + Terminal separator size + + + 1 + 2 + + + + + + + True + True + adjustment1 + 0 + left + + + 1 + 2 + 1 + 2 + GTK_EXPAND + 20 + - 1 - 2 - 3 - 4 - - GTK_EXPAND + 0 - + True - Window borders - - - 4 - 5 - - - - - - - True - True - False - True - True - - - 1 - 2 - 4 - 5 - - GTK_EXPAND - - - - - True - Tab position - - - 5 - 6 - - - - - - - True - TabPositionListStore - 0 + vertical + 6 - - - 0 - + + True + 0 + <b>Titlebar</b> + True + + + False + False + 0 + + + + + True + 12 + + + True + 3 + 4 + 6 + 6 + + + True + True + True + #000000000000 + + + 1 + 2 + 1 + 2 + + + + + + + True + True + True + #000000000000 + + + 2 + 3 + 1 + 2 + + + + + + + True + True + True + #000000000000 + + + 1 + 2 + 2 + 3 + + + + + + + True + True + True + #000000000000 + + + 2 + 3 + 2 + 3 + + + + + + + True + True + True + #000000000000 + + + 3 + 4 + 1 + 2 + + + + + + + True + True + True + #000000000000 + + + 3 + 4 + 2 + 3 + + + + + + + True + Receiving terminal + + + 3 + 4 + GTK_EXPAND + + + + + + True + Focused terminal + + + 1 + 2 + GTK_EXPAND + + + + + + True + Inactive terminal + + + 2 + 3 + GTK_EXPAND + + + + + + True + Foreground + + + 1 + 2 + + + + + + + True + Background + + + 2 + 3 + + + + + + + + + + + + False + 1 + - 1 - 2 - 5 - 6 - - GTK_EXPAND - - - - - True - Mouse focus - - - - - - - - - True - FocusListStore - 0 - - - - 0 - - - - - 1 - 2 - - GTK_EXPAND - - - - - True - Terminal separator size - - - 1 - 2 - - - - - - - True - True - adjustment1 - 0 - left - - - 1 - 2 - 1 - 2 - GTK_EXPAND - 20 + 1 diff --git a/terminatorlib/prefseditor.py b/terminatorlib/prefseditor.py index 39c89677..20f691c7 100755 --- a/terminatorlib/prefseditor.py +++ b/terminatorlib/prefseditor.py @@ -384,6 +384,12 @@ class PrefsEditor: for i in xrange(1, 17): widget = guiget('palette-colorpicker-%d' % i) widget.set_color(gtk.gdk.Color(palette[i - 1])) + # Titlebar colors + for bit in ['title_transmit_fg_color', 'title_transmit_bg_color', + 'title_receive_fg_color', 'title_receive_bg_color', + 'title_inactive_fg_color', 'title_inactive_bg_color']: + widget = guiget(bit) + widget.set_color(gtk.gdk.Color(self.config[bit])) ## Background tab # Radio values @@ -546,6 +552,12 @@ class PrefsEditor: widget = guiget('palette-colorpicker-%d' % i) palette.append(widget.get_color().to_string()) self.config['palette'] = ':'.join(palette) + # Titlebar colours + for bit in ['title_transmit_fg_color', 'title_transmit_bg_color', + 'title_receive_fg_color', 'title_receive_bg_color', + 'title_inactive_fg_color', 'title_inactive_bg_color']: + widget = guiget(bit) + self.config[bit] = widget.get_color().to_string() ## Background tab # Background type