From a1b609e0c4e0ba3a4f027eaafc666d98842094f8 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Tue, 4 Jan 2011 02:59:42 +0000 Subject: displays message in ConversationTabs when a resource goes offline --- src/core.py | 5 +++++ 1 file changed, 5 insertions(+) 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() -- cgit v1.2.3