diff options
author | mathieui <mathieui@mathieui.net> | 2011-11-24 20:33:52 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-11-24 20:33:52 +0100 |
commit | aa342ca3418d633e3df05945c3bbd12fd36bbb54 (patch) | |
tree | 3eddedac5ce97c425a6363f658b1cf0b609c218d | |
parent | a360588fa0c4085bbd79f53b44d94e794fc5a7b8 (diff) | |
download | poezio-aa342ca3418d633e3df05945c3bbd12fd36bbb54.tar.gz poezio-aa342ca3418d633e3df05945c3bbd12fd36bbb54.tar.bz2 poezio-aa342ca3418d633e3df05945c3bbd12fd36bbb54.tar.xz poezio-aa342ca3418d633e3df05945c3bbd12fd36bbb54.zip |
Add a way to scroll up and down the information buffer
-rw-r--r-- | src/core.py | 20 |
1 files changed, 20 insertions, 0 deletions
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 |