diff options
author | Jean-Marie Traissard <jim@lapin.org> | 2006-09-25 08:23:31 +0400 |
---|---|---|
committer | Jean-Marie Traissard <jim@lapin.org> | 2006-09-25 08:23:31 +0400 |
commit | 921274b6c469e2f4000c55aea9d46c5d7b959772 (patch) | |
tree | a79cccfc4ffe9f578e844138d6e2c64c90054843 | |
parent | edc176975ec1de547034afd7a27923b95f8c8ad8 (diff) |
Remove "state_active_color" option. Get fg color from gtk.
-rw-r--r-- | data/glade/gajim_themes_window.glade | 46 | ||||
-rw-r--r-- | src/chat_control.py | 6 | ||||
-rw-r--r-- | src/common/config.py | 2 | ||||
-rw-r--r-- | src/gajim_themes_window.py | 9 | ||||
-rw-r--r-- | src/groupchat_control.py | 4 |
5 files changed, 7 insertions, 60 deletions
diff --git a/data/glade/gajim_themes_window.glade b/data/glade/gajim_themes_window.glade index 44d7e381c..9f0dd0092 100644 --- a/data/glade/gajim_themes_window.glade +++ b/data/glade/gajim_themes_window.glade @@ -555,52 +555,6 @@ Banner</property> </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> <property name="label" translatable="yes"><b>Chatstate Tab Colors</b></property> diff --git a/src/chat_control.py b/src/chat_control.py index 00fa0359d..037b1b534 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -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: diff --git a/src/common/config.py b/src/common/config.py index c229c8b81..ddd9b5822 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -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' ], diff --git a/src/gajim_themes_window.py b/src/gajim_themes_window.py index cc9b1742e..ef40d4b22 100644 --- a/src/gajim_themes_window.py +++ b/src/gajim_themes_window.py @@ -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') diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 8b70ed0fa..aab8bf2db 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -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) |