chatstate. change default colors
This commit is contained in:
@@ -23,13 +23,16 @@ class ChatstatePlugin(GajimPlugin):
|
|||||||
(ged.POSTCORE, self.raw_pres_received),}
|
(ged.POSTCORE, self.raw_pres_received),}
|
||||||
self.config_default_values = {
|
self.config_default_values = {
|
||||||
'active': ('darkblue',''),
|
'active': ('darkblue',''),
|
||||||
'composing': ('darkred', ''),
|
'composing': ('darkgreen', ''),
|
||||||
'inactive': ('#675B5B',''),
|
'inactive': ('#675B5B',''),
|
||||||
'paused': ('darkgreen', ''),}
|
'paused': ('darkred', ''),}
|
||||||
self.compose = ('active', 'composing', 'gone', 'inactive', 'paused')
|
self.compose = ('active', 'composing', 'gone', 'inactive', 'paused')
|
||||||
|
self.active = None
|
||||||
|
|
||||||
|
|
||||||
def raw_pres_received(self, event_object):
|
def raw_pres_received(self, event_object):
|
||||||
|
if not self.active:
|
||||||
|
return
|
||||||
jid = str(event_object.xmpp_msg.getFrom())
|
jid = str(event_object.xmpp_msg.getFrom())
|
||||||
account = event_object.account
|
account = event_object.account
|
||||||
contact = gajim.contacts.get_contact_from_full_jid(account, jid)
|
contact = gajim.contacts.get_contact_from_full_jid(account, jid)
|
||||||
@@ -68,10 +71,12 @@ class ChatstatePlugin(GajimPlugin):
|
|||||||
|
|
||||||
@log_calls('ChatstatePlugin')
|
@log_calls('ChatstatePlugin')
|
||||||
def activate(self):
|
def activate(self):
|
||||||
|
self.active = True
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@log_calls('ChatstatePlugin')
|
@log_calls('ChatstatePlugin')
|
||||||
def deactivate(self):
|
def deactivate(self):
|
||||||
|
self.active = False
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user