summaryrefslogtreecommitdiff
path: root/src/tabs.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-01-13 00:25:43 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-01-13 00:25:43 +0100
commit086cc82e1e85399fc8043dea598f75eff847b928 (patch)
tree21dce00a270dbb6b1d7aec3cd0cd916f6ae40535 /src/tabs.py
parentc2d1bf211f5045ec9a97f1836e30feadb40c37ce (diff)
downloadpoezio-086cc82e1e85399fc8043dea598f75eff847b928.tar.gz
poezio-086cc82e1e85399fc8043dea598f75eff847b928.tar.bz2
poezio-086cc82e1e85399fc8043dea598f75eff847b928.tar.xz
poezio-086cc82e1e85399fc8043dea598f75eff847b928.zip
/close command closes MucListTab
Diffstat (limited to 'src/tabs.py')
-rw-r--r--src/tabs.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 2149e36c..83dc9079 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1136,11 +1136,14 @@ class MucListTab(Tab):
self.input = self.default_help_message
self.key_func["KEY_DOWN"] = self.listview.move_cursor_down
self.key_func["KEY_UP"] = self.listview.move_cursor_up
+ self.key_func['^I'] = self.completion
+ self.key_func['M-i'] = self.completion
self.key_func["/"] = self.on_slash
self.key_func['j'] = self.join_selected
self.key_func['J'] = self.join_selected_no_focus
self.key_func['^J'] = self.join_selected
self.key_func['^M'] = self.join_selected
+ self.commands['close'] = (self.close, _("Usage: /close\nClose: Just close this tab"), None)
self.resize()
def refresh(self, tabs, informations, roster):
@@ -1176,6 +1179,9 @@ class MucListTab(Tab):
self.input.resize(1, self.width, self.height-1, 0, self.core.stdscr)
self.input.do_command("/") # we add the slash
+ def close(self, arg=None):
+ self.core.close_tab(self)
+
def join_selected_no_focus(self):
return
@@ -1217,13 +1223,16 @@ class MucListTab(Tab):
return True
def execute_slash_command(self, txt):
- if txt.startswith('/'):
- self.core.execute(txt)
+ self.execute_command(txt)
return self.reset_help_message()
def get_name(self):
return self.name
+ def completion(self):
+ if isinstance(self.input, windows.CommandInput):
+ self.complete_commands(self.input)
+
def on_input(self, key):
res = self.input.do_command(key)
if res: