summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-12 02:50:07 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-02-12 02:50:07 +0000
commit0b418971bc655d10e46e3a9bc6b163cbb74b0ccb (patch)
tree8b6de1cd77f037469db87202c94da930fd241ffa /src
parent66ea0ea1c15c6c3ef869d255dc7da11674570b62 (diff)
downloadpoezio-0b418971bc655d10e46e3a9bc6b163cbb74b0ccb.tar.gz
poezio-0b418971bc655d10e46e3a9bc6b163cbb74b0ccb.tar.bz2
poezio-0b418971bc655d10e46e3a9bc6b163cbb74b0ccb.tar.xz
poezio-0b418971bc655d10e46e3a9bc6b163cbb74b0ccb.zip
fixed #1164
Diffstat (limited to 'src')
-rw-r--r--src/gui.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui.py b/src/gui.py
index 9a2093dc..00e7248f 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -176,6 +176,8 @@ class Gui(object):
'exit': (self.command_quit, _('Usage: /exit\nExit: Just disconnect from the server and exit poezio.')),
'next': (self.rotate_rooms_right, _('Usage: /next\nNext: Go to the next room.')),
'prev': (self.rotate_rooms_left, _('Usage: /prev\nPrev: Go to the previous room.')),
+ 'win': (self.command_win, _('Usage: /win <number>\nWin: Go to the specified room.')),
+ 'w': (self.command_win, _('Usage: /w <number>\nW: Go to the specified room.')),
'part': (self.command_part, _('Usage: /part [message]\nPart: disconnect from a room. You can specify an optional message.')),
'show': (self.command_show, _(u'Usage: /show <availability> [status]\nShow: Change your availability and (optionaly) your status. The <availability> argument is one of "avail, available, ok, here, chat, away, afk, dnd, busy, xa" and the optional [message] argument will be your status message')),
'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]"')),
@@ -406,6 +408,28 @@ class Gui(object):
self.window.text_win.refresh(room.name)
self.window.input.refresh()
+ def command_win(self, args):
+ if len(args) != 1:
+ self.command_help(['win'])
+ return
+ try:
+ nb = int(args[0])
+ except ValueError:
+ self.command_help(['win'])
+ return
+ if self.current_room().nb == nb:
+ return
+ self.current_room().set_color_state(11)
+ start = self.current_room()
+ self.rooms.append(self.rooms.pop(0))
+ while self.current_room().nb != nb:
+ self.rooms.append(self.rooms.pop(0))
+ if self.current_room() == start:
+ self.window.refresh(self.rooms)
+ return
+ self.window.refresh(self.rooms)
+
+
def command_kick(self, args):
if len(args) < 1:
self.command_help(['kick'])