Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2006-03-19 01:40:26 +0300
committerYann Leboulanger <asterix@lagaule.org>2006-03-19 01:40:26 +0300
commit96dcb1bd0c28061b7f63f29197cbe987e9da621c (patch)
tree796ce96ce6557bfc54e9a3c8ea45e75256bcd763 /src/gajim_themes_window.py
parentdf395ab6ef288ab09276b578721c72a5f4e01058 (diff)
chatstate colors are now configurable in manage theme window. Fixes #1568
Diffstat (limited to 'src/gajim_themes_window.py')
-rw-r--r--src/gajim_themes_window.py46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/gajim_themes_window.py b/src/gajim_themes_window.py
index 38cae4966..0fd9f0205 100644
--- a/src/gajim_themes_window.py
+++ b/src/gajim_themes_window.py
@@ -58,6 +58,11 @@ class GajimThemesWindow:
self.italic_togglebutton = self.xml.get_widget('italic_togglebutton')
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',
+ 'muc_msg', 'muc_directed_msg'):
+ self.colorbuttons[chatstate] = self.xml.get_widget(chatstate + \
+ '_colorbutton')
model = gtk.ListStore(str)
self.themes_tree.set_model(model)
col = gtk.TreeViewColumn(_('Theme'))
@@ -203,6 +208,12 @@ class GajimThemesWindow:
self.text_fontbutton.set_sensitive(state)
self.no_update = False
gajim.interface.roster.change_roster_style(None)
+
+ for chatstate in ('active', 'inactive', 'composing', 'paused', 'gone',
+ 'muc_msg', 'muc_directed_msg'):
+ color = gajim.config.get_per('themes', theme, 'state_' + chatstate + \
+ '_color')
+ self.colorbuttons[chatstate].set_color(gtk.gdk.color_parse(color))
def on_textcolor_checkbutton_toggled(self, widget):
state = widget.get_active()
@@ -329,3 +340,38 @@ class GajimThemesWindow:
if font_description.get_style() != pango.STYLE_ITALIC:
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')
+ self.no_update = False
+
+ def on_composing_colorbutton_color_set(self, widget):
+ self.no_update = True
+ self._set_color(True, widget, 'state_composing_color')
+ self.no_update = False
+
+ def on_paused_colorbutton_color_set(self, widget):
+ self.no_update = True
+ self._set_color(True, widget, 'state_paused_color')
+ self.no_update = False
+
+ def on_gone_colorbutton_color_set(self, widget):
+ self.no_update = True
+ self._set_color(True, widget, 'state_gone_color')
+ self.no_update = False
+
+ def on_muc_msg_colorbutton_color_set(self, widget):
+ self.no_update = True
+ self._set_color(True, widget, 'state_muc_msg_color')
+ self.no_update = False
+
+ def on_muc_directed_msg_colorbutton_color_set(self, widget):
+ self.no_update = True
+ self._set_color(True, widget, 'state_muc_directed_msg_color')
+ self.no_update = False