Commit 921274b6 authored by jimpp's avatar jimpp

Remove "state_active_color" option. Get fg color from gtk.

parent edc17697
......@@ -554,52 +554,6 @@ Banner</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label388">
<property name="visible">True</property>
<property name="label" translatable="yes">Active</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkColorButton" id="active_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="use_alpha">False</property>
<property name="focus_on_click">True</property>
<signal name="color_set" handler="on_active_colorbutton_color_set" last_modification_time="Sat, 18 Mar 2006 22:34:13 GMT"/>
</widget>
<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">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label393">
<property name="visible">True</property>
......
......@@ -1275,9 +1275,6 @@ class ChatControl(ChatControlBase):
elif chatstate == 'paused':
color = gajim.config.get_per('themes', theme,
'state_paused_color')
else:
color = gajim.config.get_per('themes', theme,
'state_active_color')
if color:
# We set the color for when it's the current tab or not
color = gtk.gdk.colormap_get_system().alloc_color(color)
......@@ -1286,6 +1283,9 @@ class ChatControl(ChatControlBase):
if chatstate in ('inactive', 'gone') and\
self.parent_win.get_active_control() != self:
color = self.lighten_color(color)
else: # active or no chatstate
color = self.parent_win.notebook.style.fg[gtk.STATE_ACTIVE]
name = self.contact.get_shown_name()
if self.resource:
......
......@@ -287,8 +287,6 @@ class Config:
'bannerfontattrs': [ opt_str, 'B', '', True ],
# http://www.pitt.edu/~nisg/cis/web/cgi/rgb.html
# FIXME: not black but the default color from gtk+ theme
'state_active_color': [ opt_color, 'black' ],
'state_inactive_color': [ opt_color, 'grey62' ],
'state_composing_color': [ opt_color, 'green4' ],
'state_paused_color': [ opt_color, 'mediumblue' ],
......
......@@ -51,7 +51,7 @@ class GajimThemesWindow:
self.themes_tree = self.xml.get_widget('themes_treeview')
self.theme_options_vbox = self.xml.get_widget('theme_options_vbox')
self.colorbuttons = {}
for chatstate in ('active', 'inactive', 'composing', 'paused', 'gone',
for chatstate in ('inactive', 'composing', 'paused', 'gone',
'muc_msg', 'muc_directed_msg'):
self.colorbuttons[chatstate] = self.xml.get_widget(chatstate + \
'_colorbutton')
......@@ -198,7 +198,7 @@ class GajimThemesWindow:
self.no_update = False
gajim.interface.roster.change_roster_style(None)
for chatstate in ('active', 'inactive', 'composing', 'paused', 'gone',
for chatstate in ('inactive', 'composing', 'paused', 'gone',
'muc_msg', 'muc_directed_msg'):
color = gajim.config.get_per('themes', theme, 'state_' + chatstate + \
'_color')
......@@ -333,11 +333,6 @@ class GajimThemesWindow:
font_props[1] = True
return font_props
def on_active_colorbutton_color_set(self, widget):
self.no_update = True
self._set_color(True, widget, 'state_active_color')
self.no_update = False
def on_inactive_colorbutton_color_set(self, widget):
self.no_update = True
self._set_color(True, widget, 'state_inactive_color')
......
......@@ -372,13 +372,13 @@ class GroupchatControl(ChatControlBase):
elif chatstate:
if chatstate == 'active' or (current_tab and has_focus):
self.attention_flag = False
color = gajim.config.get_per('themes', theme,
'state_active_color')
elif chatstate == 'newmsg' and (not has_focus or not current_tab) and\
not self.attention_flag:
color = gajim.config.get_per('themes', theme, 'state_muc_msg_color')
if color:
color = gtk.gdk.colormap_get_system().alloc_color(color)
else:
color = self.parent_win.notebook.style.fg[gtk.STATE_ACTIVE]
label_str = self.name
return (label_str, color)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment