From aa342ca3418d633e3df05945c3bbd12fd36bbb54 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 24 Nov 2011 20:33:52 +0100 Subject: Add a way to scroll up and down the information buffer --- src/core.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') diff --git a/src/core.py b/src/core.py index 0b1755b1..dffa7966 100644 --- a/src/core.py +++ b/src/core.py @@ -155,6 +155,8 @@ class Core(object): 'M-z': self.go_to_previous_tab, '^L': self.full_screen_redraw, 'M-j': self.go_to_room_number, + 'M-d': self.scroll_info_up, + 'M-c': self.scroll_info_down, } # Add handlers @@ -268,6 +270,24 @@ class Core(object): tab.on_info_win_size_changed() self.refresh_window() + def scroll_info_up(self): + self.information_win.scroll_up(self.information_win.height) + if not isinstance(self.current_tab(), tabs.RosterInfoTab): + self.information_win.refresh() + else: + info = self.current_tab().information_win + info.scroll_up(info.height) + self.refresh_window() + + def scroll_info_down(self): + self.information_win.scroll_down(self.information_win.height) + if not isinstance(self.current_tab(), tabs.RosterInfoTab): + self.information_win.refresh() + else: + info = self.current_tab().information_win + info.scroll_down(info.height) + self.refresh_window() + def pop_information_win_up(self, size, time): """ Temporarly increase the size of the information win of size lines -- cgit v1.2.3