summaryrefslogtreecommitdiff
path: root/poezio/tabs/basetabs.py
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-05-15 22:41:18 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-05-15 22:41:18 +0100
commita3dfd55e049d289ff8086878eadcea4f8e258502 (patch)
tree5abbedcb42aa6967e546f8b8f49d75c1faf575f6 /poezio/tabs/basetabs.py
parentcc4132e0b4ba8ce8ad7ccaac5ed0a45146020563 (diff)
downloadpoezio-a3dfd55e049d289ff8086878eadcea4f8e258502.tar.gz
poezio-a3dfd55e049d289ff8086878eadcea4f8e258502.tar.bz2
poezio-a3dfd55e049d289ff8086878eadcea4f8e258502.tar.xz
poezio-a3dfd55e049d289ff8086878eadcea4f8e258502.zip
Merge /unquery and /close into OneToOneTab.
Diffstat (limited to 'poezio/tabs/basetabs.py')
-rw-r--r--poezio/tabs/basetabs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 2f6be22b..f4c4cf0a 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -709,6 +709,10 @@ class OneToOneTab(ChatTab):
self.remote_supports_attention = True
self.remote_supports_receipts = True
self.check_features()
+ self.register_command('unquery', self.command_unquery,
+ shortdesc='Close the tab.')
+ self.register_command('close', self.command_unquery,
+ shortdesc='Close the tab.')
def remote_user_color(self):
return dump_tuple(get_theme().COLOR_REMOTE_USER)
@@ -816,6 +820,13 @@ class OneToOneTab(ChatTab):
def command_say(self, line, correct=False, attention=False):
pass
+ @command_args_parser.ignored
+ def command_unquery(self):
+ """
+ /unquery
+ """
+ self.core.close_tab(self)
+
def missing_command_callback(self, command_name):
if command_name not in ('correct', 'attention'):
return False