summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-05 00:36:43 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-10-05 00:36:43 +0000
commit8caf7651a90861fadf9c05585f177c4beac3d7ac (patch)
tree164f642d34494c2f4a6946b235e8ca70dc2a230d
parent01e5856162f31235546460eb489b9976783be69d (diff)
downloadpoezio-8caf7651a90861fadf9c05585f177c4beac3d7ac.tar.gz
poezio-8caf7651a90861fadf9c05585f177c4beac3d7ac.tar.bz2
poezio-8caf7651a90861fadf9c05585f177c4beac3d7ac.tar.xz
poezio-8caf7651a90861fadf9c05585f177c4beac3d7ac.zip
C-w go to previous tab. M-r go to roster. That's awesome
-rw-r--r--src/gui.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui.py b/src/gui.py
index 98145449..57cc7ab1 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -91,6 +91,7 @@ class Gui(object):
self.information_win_size = 2 # Todo, get this from config
self.ignores = {}
self.resize_timer = None
+ self.previous_tab_nb = 0
self.commands = {
'help': (self.command_help, '\_o< KOIN KOIN KOIN'),
@@ -136,6 +137,8 @@ class Gui(object):
"^N": self.rotate_rooms_right,
"KEY_RESIZE": self.call_for_resize,
'^X': self.go_to_important_room,
+ 'M-r': self.go_to_roster,
+ '^W': self.go_to_previous_tab,
'^V': self.move_separator,
}
@@ -603,6 +606,12 @@ class Gui(object):
self.command_win("%s" % new_tab.nb)
self.refresh_window()
+ def go_to_roster(self):
+ self.command_win('0')
+
+ def go_to_previous_tab(self):
+ self.command_win('%s' % (self.previous_tab_nb,))
+
def go_to_important_room(self):
"""
Go to the next room with activity, in this order:
@@ -866,6 +875,7 @@ class Gui(object):
return
if self.current_tab().nb == nb:
return
+ self.previous_tab_nb = self.current_tab().nb
self.current_tab().on_lose_focus()
start = self.current_tab()
self.tabs.append(self.tabs.pop(0))