From 95441c70a2409af45a8abacecbd9999fd3320f40 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Sat, 2 Oct 2010 22:25:26 +0400 Subject: [PATCH] chatstate. change default colors --- chatstate/chatstate.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/chatstate/chatstate.py b/chatstate/chatstate.py index 2fd4c8b..ee6f87f 100644 --- a/chatstate/chatstate.py +++ b/chatstate/chatstate.py @@ -23,13 +23,16 @@ class ChatstatePlugin(GajimPlugin): (ged.POSTCORE, self.raw_pres_received),} self.config_default_values = { 'active': ('darkblue',''), - 'composing': ('darkred', ''), + 'composing': ('darkgreen', ''), 'inactive': ('#675B5B',''), - 'paused': ('darkgreen', ''),} + 'paused': ('darkred', ''),} self.compose = ('active', 'composing', 'gone', 'inactive', 'paused') + self.active = None def raw_pres_received(self, event_object): + if not self.active: + return jid = str(event_object.xmpp_msg.getFrom()) account = event_object.account contact = gajim.contacts.get_contact_from_full_jid(account, jid) @@ -68,10 +71,12 @@ class ChatstatePlugin(GajimPlugin): @log_calls('ChatstatePlugin') def activate(self): + self.active = True pass @log_calls('ChatstatePlugin') def deactivate(self): + self.active = False pass