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

dev.gajim.org/gajim/gajim-plugins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Fomin <fominde@gmail.com>2010-10-03 00:20:31 +0400
committerDenis Fomin <fominde@gmail.com>2010-10-03 00:20:31 +0400
commitc820b8b3995633c96db6665a47c0411f4706d227 (patch)
tree861ecfbdfa275221f543048ef955742b81dbdc47 /chatstate
parent12623b963f6d829f4297370dbb8f0dd062b6b5e7 (diff)
chatstate. use default color if chatstate is 'gone'
Diffstat (limited to 'chatstate')
-rw-r--r--chatstate/chatstate.py32
-rw-r--r--chatstate/manifest.ini2
2 files changed, 16 insertions, 18 deletions
diff --git a/chatstate/chatstate.py b/chatstate/chatstate.py
index cd8cf83..0f2e6ba 100644
--- a/chatstate/chatstate.py
+++ b/chatstate/chatstate.py
@@ -47,24 +47,22 @@ class ChatstatePlugin(GajimPlugin):
for child_iter in child_iters:
name = gobject.markup_escape_text(contact.get_shown_name())
theme = gajim.config.get('roster_theme')
- color = None
- if chatstate == 'composing':
- color = gajim.config.get_per('themes', theme,
- 'state_composing_color')
- elif chatstate == 'inactive':
- color = gajim.config.get_per('themes', theme,
- 'state_inactive_color')
- elif chatstate == 'gone':
- color = gajim.config.get_per('themes', theme,
- 'state_gone_color')
- elif chatstate == 'paused':
- color = gajim.config.get_per('themes', theme,
- 'state_paused_color')
- elif chatstate == 'active':
- color = gajim.config.get('inmsgcolor')
+ if chatstate != 'gone':
+ color = None
+ if chatstate == 'composing':
+ color = gajim.config.get_per('themes', theme,
+ 'state_composing_color')
+ elif chatstate == 'inactive':
+ color = gajim.config.get_per('themes', theme,
+ 'state_inactive_color')
+ elif chatstate == 'paused':
+ color = gajim.config.get_per('themes', theme,
+ 'state_paused_color')
+ elif chatstate == 'active':
+ color = gajim.config.get('inmsgcolor')
- name = '<span foreground="%s">%s</span>' % (
- color, name)
+ name = '<span foreground="%s">%s</span>' % (
+ color, name)
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
status = contact.status.strip()
if status != '':
diff --git a/chatstate/manifest.ini b/chatstate/manifest.ini
index 1ef91ed..2cda876 100644
--- a/chatstate/manifest.ini
+++ b/chatstate/manifest.ini
@@ -1,7 +1,7 @@
[info]
name: Chatstate in roster
short_name: chatstate
-version: 0.2
+version: 0.3
description: Chat State Notifications in roster.
Font color of the contact varies depending on the chat state.
The plugin does not work if you use custom font color for contacts in roster.