Made detail and event views scrollable with j/k keys as well

This commit is contained in:
Asmageddon 2012-06-01 21:09:00 +02:00
parent f7a4951e0d
commit a20b39325e
2 changed files with 8 additions and 0 deletions

View File

@ -146,6 +146,10 @@ class EventView(BaseMode):
self.offset += jumplen self.offset += jumplen
elif c == curses.KEY_END: elif c == curses.KEY_END:
self.offset += num_events self.offset += num_events
elif c == ord('j'):
self.offset -= 1
elif c == ord('k'):
self.offset += 1
if self.offset <= 0: if self.offset <= 0:
self.offset = 0 self.offset = 0

View File

@ -741,5 +741,9 @@ class TorrentDetail(BaseMode, component.Component):
return return
elif chr(c) == 'h': elif chr(c) == 'h':
self.popup = Popup(self,"Help",init_lines=self.__help_lines, height_req=0.75, width_req=65) self.popup = Popup(self,"Help",init_lines=self.__help_lines, height_req=0.75, width_req=65)
elif chr(c) == 'j':
self.file_list_up()
if chr(c) == 'k':
self.file_list_down()
self.refresh() self.refresh()