diff options
author | mathieui <mathieui@mathieui.net> | 2014-03-23 00:47:05 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-03-23 00:47:05 +0100 |
commit | 5c9dd440377ebcd682bc6a2cae1e9466813a476d (patch) | |
tree | db8444d7286a7b504a8a4e1cf5e9ae11aa59d54c | |
parent | fba511e266e5e57d645ed16fb0ebfca946a6f3d4 (diff) | |
download | poezio-5c9dd440377ebcd682bc6a2cae1e9466813a476d.tar.gz poezio-5c9dd440377ebcd682bc6a2cae1e9466813a476d.tar.bz2 poezio-5c9dd440377ebcd682bc6a2cae1e9466813a476d.tar.xz poezio-5c9dd440377ebcd682bc6a2cae1e9466813a476d.zip |
Add jid info to the unlock messages
-rw-r--r-- | src/core.py | 2 | ||||
-rw-r--r-- | src/tabs/conversationtab.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/core.py b/src/core.py index 3d90513e..b762fe50 100644 --- a/src/core.py +++ b/src/core.py @@ -3459,7 +3459,7 @@ class Core(object): 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() + tab.unlock(from_=jid.full) if contact is None: return roster.modified() diff --git a/src/tabs/conversationtab.py b/src/tabs/conversationtab.py index 21c858fd..5e9734d5 100644 --- a/src/tabs/conversationtab.py +++ b/src/tabs/conversationtab.py @@ -393,14 +393,17 @@ class DynamicConversationTab(ConversationTab): self.unlock() self.refresh_info_header() - def unlock(self): + def unlock(self, from_=None): """ Unlock the tab from a resource. It is now “associated” with the bare jid. """ if self.locked_resource != None: self.locked_resource = None - self.add_message(_('Conversation unlocked.'), typ=0) + if from_: + self.add_message(_('Conversation unlocked (received activity from %s).') % from_, typ=0) + else: + self.add_message(_('Conversation unlocked.'), typ=0) def get_dest_jid(self): """ |