From ad7e9b749d509ccbb1c1676491e86b7b812b0298 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 10 Feb 2011 16:08:17 +0100 Subject: /win completion and fix the return values of other completions --- src/core.py | 56 ++++++++++++++++++++++---------------------------------- src/tabs.py | 12 ++++++------ src/windows.py | 1 - 3 files changed, 28 insertions(+), 41 deletions(-) diff --git a/src/core.py b/src/core.py index 903312bf..ae3bc55b 100644 --- a/src/core.py +++ b/src/core.py @@ -72,6 +72,15 @@ SHOW_NAME = { '': _('available') } +possible_show = {'available':None, + 'chat':'chat', + 'away':'away', + 'afk':'away', + 'dnd':'dnd', + 'busy':'dnd', + 'xa':'xa' + } + resize_lock = threading.Lock() class Core(object): @@ -111,8 +120,8 @@ class Core(object): 'exit': (self.command_quit, _("Usage: /exit\nExit: Just disconnect from the server and exit poezio."), None), 'next': (self.rotate_rooms_right, _("Usage: /next\nNext: Go to the next room."), None), 'prev': (self.rotate_rooms_left, _("Usage: /prev\nPrev: Go to the previous room."), None), - 'win': (self.command_win, _("Usage: /win \nWin: Go to the specified room."), None), - 'w': (self.command_win, _("Usage: /w \nW: Go to the specified room."), None), + 'win': (self.command_win, _("Usage: /win \nWin: Go to the specified room."), self.completion_win), + 'w': (self.command_win, _("Usage: /w \nW: Go to the specified room."), self.completion_win), 'show': (self.command_show, _("Usage: /show [status]\nShow: Change your availability and (optionaly) your status, but only in the MUCs. This doesn’t affect the way your contacts will see you in their roster. The argument is one of \"available, chat, away, afk, dnd, busy, xa\" and the optional [status] argument will be your status message"), self.completion_show), 'away': (self.command_away, _("Usage: /away [message]\nAway: Sets your availability to away and (optional) sets your status message. This is equivalent to '/show away [message]'"), None), 'busy': (self.command_busy, _("Usage: /busy [message]\nBusy: Sets your availability to busy and (optional) sets your status message. This is equivalent to '/show busy [message]'"), None), @@ -122,7 +131,7 @@ class Core(object): 'set': (self.command_set, _("Usage: /set