summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-01-26 05:33:50 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-01-26 05:35:07 +0100
commitd6fec9775ad5de3f483a945d3bf2fe1f36bcfb6a (patch)
tree078deed50d8ab6d8d5b8efd035131dc1422920e9 /src
parentdd2a6d1d6552476db671ad77d55d549122947954 (diff)
downloadpoezio-d6fec9775ad5de3f483a945d3bf2fe1f36bcfb6a.tar.gz
poezio-d6fec9775ad5de3f483a945d3bf2fe1f36bcfb6a.tar.bz2
poezio-d6fec9775ad5de3f483a945d3bf2fe1f36bcfb6a.tar.xz
poezio-d6fec9775ad5de3f483a945d3bf2fe1f36bcfb6a.zip
Add an /unlock command to manually unlock a DynamicConversationTab.
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index fb47591b..2dd677ec 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -3194,6 +3194,8 @@ class DynamicConversationTab(ConversationTab):
self.lock(resource)
self.info_header = windows.DynamicConversationInfoWin()
ConversationTab.__init__(self, jid)
+ self.register_command('unlock', self.unlock_command,
+ shortdesc=_('Unlock the converstation from a particular resource.'))
def lock(self, resource):
"""
@@ -3202,6 +3204,10 @@ class DynamicConversationTab(ConversationTab):
assert(resource)
self.locked_resource = resource
+ def unlock_command(self, arg=None):
+ self.unlock()
+ self.refresh_info_header()
+
def unlock(self):
"""
Unlock the tab from a resource. It is now “associated” with the bare