Add a way to scroll up and down the information buffer
This commit is contained in:
parent
a360588fa0
commit
aa342ca341
1 changed files with 20 additions and 0 deletions
20
src/core.py
20
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
|
||||
|
|
Loading…
Reference in a new issue