summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-03-28 00:53:18 +0100
committermathieui <mathieui@mathieui.net>2014-03-28 00:53:18 +0100
commitf7294b29e4c3f1b0aa73b088baf7b19f8b334ca5 (patch)
treee2b0b0bacf22b1031a10f531411053d55abf2ee2 /src/core.py
parentc2d9151f38ce50110e31eae0aa16777040b60362 (diff)
downloadpoezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.tar.gz
poezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.tar.bz2
poezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.tar.xz
poezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.zip
Improve dynamic conversation tabs
Add color to the info messages Unlock the tab when the locked resource goes offline
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py
index c3ae2ef8..890e59d9 100644
--- a/src/core.py
+++ b/src/core.py
@@ -3457,8 +3457,11 @@ class Core(object):
jid = presence['from']
contact = roster[jid.bare]
tab = self.get_conversation_by_jid(jid, create=False)
- if isinstance(tab, tabs.DynamicConversationTab) and tab.get_dest_jid() != jid.full:
- tab.unlock(from_=jid.full)
+ if isinstance(tab, tabs.DynamicConversationTab):
+ if tab.get_dest_jid() != jid.full:
+ tab.unlock(from_=jid.full)
+ elif presence['type'] == 'unavailable':
+ tab.unlock()
if contact is None:
return
roster.modified()