summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-04 02:59:42 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-04 02:59:42 +0000
commita1b609e0c4e0ba3a4f027eaafc666d98842094f8 (patch)
tree14e70b693a36b3eab3bca1ef9256489b44f673a6 /src
parent59195ffaffa791169e31e4d6b5804ea9d697e67f (diff)
downloadpoezio-a1b609e0c4e0ba3a4f027eaafc666d98842094f8.tar.gz
poezio-a1b609e0c4e0ba3a4f027eaafc666d98842094f8.tar.bz2
poezio-a1b609e0c4e0ba3a4f027eaafc666d98842094f8.tar.xz
poezio-a1b609e0c4e0ba3a4f027eaafc666d98842094f8.zip
displays message in ConversationTabs when a resource goes offline
Diffstat (limited to 'src')
-rw-r--r--src/core.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index d7fa3157..88dde997 100644
--- a/src/core.py
+++ b/src/core.py
@@ -199,6 +199,11 @@ class Core(object):
resource = contact.get_resource_by_fulljid(jid.full)
assert resource
self.information('%s is offline' % (resource.get_jid()), "Roster")
+ # Search all opened tab with this fulljid or the bare jid and add
+ # an information message in all of them
+ tab = self.get_tab_by_name(jid.full)
+ if tab and isinstance(tab, tabs.ConversationTab):
+ self.add_message_to_text_buffer(tab.get_room(), '%s is offline' % (resource.get_jid()))
contact.remove_resource(resource)
if isinstance(self.current_tab(), tabs.RosterInfoTab):
self.refresh_window()