diff options
author | mathieui <mathieui@mathieui.net> | 2014-03-23 00:38:33 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-03-23 00:38:33 +0100 |
commit | fba511e266e5e57d645ed16fb0ebfca946a6f3d4 (patch) | |
tree | 0236a5206e3326d2e072b7a4aa08b6b62bd46eaa /src | |
parent | 186803d9a97d7efb089acc470b98293b7e472db5 (diff) | |
download | poezio-fba511e266e5e57d645ed16fb0ebfca946a6f3d4.tar.gz poezio-fba511e266e5e57d645ed16fb0ebfca946a6f3d4.tar.bz2 poezio-fba511e266e5e57d645ed16fb0ebfca946a6f3d4.tar.xz poezio-fba511e266e5e57d645ed16fb0ebfca946a6f3d4.zip |
Notify the user whenever the lock state of a dynamic conversation changes
Diffstat (limited to 'src')
-rw-r--r-- | src/tabs/conversationtab.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tabs/conversationtab.py b/src/tabs/conversationtab.py index 64eeb4bf..21c858fd 100644 --- a/src/tabs/conversationtab.py +++ b/src/tabs/conversationtab.py @@ -385,7 +385,9 @@ class DynamicConversationTab(ConversationTab): Lock the tab to the resource. """ assert(resource) - self.locked_resource = resource + if resource != self.locked_resource: + self.locked_resource = resource + self.add_message(_('Conversation locked to %s/%s.') % (self.name, resource), typ=0) def unlock_command(self, arg=None): self.unlock() @@ -396,7 +398,9 @@ class DynamicConversationTab(ConversationTab): Unlock the tab from a resource. It is now “associated” with the bare jid. """ - self.locked_resource = None + if self.locked_resource != None: + self.locked_resource = None + self.add_message(_('Conversation unlocked.'), typ=0) def get_dest_jid(self): """ |