Add a section to the global config for setting the various fg/bg colours of the titlebars

This commit is contained in:
Chris Jones 2010-02-08 20:22:08 +00:00
parent 7450a57013
commit ad5c927d15
3 changed files with 399 additions and 176 deletions

View File

@ -87,12 +87,12 @@ DEFAULTS = {
'hide_tabbar' : False, 'hide_tabbar' : False,
'scroll_tabbar' : False, 'scroll_tabbar' : False,
'try_posix_regexp' : platform.system() != 'Linux', 'try_posix_regexp' : platform.system() != 'Linux',
'title_transmit_fg_color' : '#ffffff', 'title_transmit_fg_color' : '#ffffffffffff',
'title_transmit_bg_color' : '#c80003', 'title_transmit_bg_color' : '#c8c800000303',
'title_receive_fg_color' : '#ffffff', 'title_receive_fg_color' : '#ffffffffffff',
'title_receive_bg_color' : '#0076c9', 'title_receive_bg_color' : '#00007676c9c9',
'title_inactive_fg_color' : '#000000', 'title_inactive_fg_color' : '#000000000000',
'title_inactive_bg_color' : '#c0bebf', 'title_inactive_bg_color' : '#c0c0bebebfbf',
'disabled_plugins' : ['TestPlugin', 'CustomCommandsMenu'], 'disabled_plugins' : ['TestPlugin', 'CustomCommandsMenu'],
}, },
'keybindings': { 'keybindings': {

View File

@ -235,6 +235,11 @@
<object class="GtkAlignment" id="alignment2"> <object class="GtkAlignment" id="alignment2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="left_padding">6</property> <property name="left_padding">6</property>
<child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">18</property>
<child> <child>
<object class="GtkTable" id="global_config_table"> <object class="GtkTable" id="global_config_table">
<property name="visible">True</property> <property name="visible">True</property>
@ -424,6 +429,212 @@
</packing> </packing>
</child> </child>
</object> </object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">&lt;b&gt;Titlebar&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="left_padding">12</property>
<child>
<object class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="n_rows">3</property>
<property name="n_columns">4</property>
<property name="column_spacing">6</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkColorButton" id="title_transmit_fg_color">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="color">#000000000000</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="title_inactive_fg_color">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="color">#000000000000</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="title_transmit_bg_color">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="color">#000000000000</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="title_inactive_bg_color">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="color">#000000000000</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="title_receive_fg_color">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="color">#000000000000</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkColorButton" id="title_receive_bg_color">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="color">#000000000000</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="label" translatable="yes">Receiving terminal</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="x_options">GTK_EXPAND</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label18">
<property name="visible">True</property>
<property name="label" translatable="yes">Focused terminal</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_EXPAND</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="label" translatable="yes">Inactive terminal</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_EXPAND</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="label" translatable="yes">Foreground</property>
</object>
<packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="label" translatable="yes">Background</property>
</object>
<packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options"></property>
<property name="y_options"></property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
</object>
</child> </child>
</object> </object>
</child> </child>

View File

@ -384,6 +384,12 @@ class PrefsEditor:
for i in xrange(1, 17): for i in xrange(1, 17):
widget = guiget('palette-colorpicker-%d' % i) widget = guiget('palette-colorpicker-%d' % i)
widget.set_color(gtk.gdk.Color(palette[i - 1])) 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 ## Background tab
# Radio values # Radio values
@ -546,6 +552,12 @@ class PrefsEditor:
widget = guiget('palette-colorpicker-%d' % i) widget = guiget('palette-colorpicker-%d' % i)
palette.append(widget.get_color().to_string()) palette.append(widget.get_color().to_string())
self.config['palette'] = ':'.join(palette) 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 tab
# Background type # Background type