Another search behaviour change: Enter now opens torrent menu and '/' closes search(as it cannot occur in torrent name anyway)

This commit is contained in:
Asmageddon 2012-05-30 22:27:24 +02:00
parent 3634f457b4
commit bbdf710b52
1 changed files with 8 additions and 2 deletions

View File

@ -981,6 +981,11 @@ class AllTorrents(BaseMode, component.Component):
self.search_state = SEARCH_EMPTY self.search_state = SEARCH_EMPTY
self.refresh([]) self.refresh([])
elif c == ord('/'):
self.entering_search = False
self.search_state = SEARCH_EMPTY
self.refresh([])
elif c == curses.KEY_RIGHT: elif c == curses.KEY_RIGHT:
tid = self.current_torrent_id() tid = self.current_torrent_id()
self.show_torrent_details(tid) self.show_torrent_details(tid)
@ -994,8 +999,9 @@ class AllTorrents(BaseMode, component.Component):
self.refresh([]) self.refresh([])
elif c in [10, curses.KEY_ENTER]: elif c in [10, curses.KEY_ENTER]:
self.entering_search = False self.last_mark = -1
self.refresh([]) tid = self.current_torrent_id()
torrent_actions_popup(self, [tid] ,details=True)
elif c == 27: elif c == 27:
self.search_string = "" self.search_string = ""