mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
DRYer
This commit is contained in:
parent
5f2f110f9f
commit
85e8d8c82f
@ -89,15 +89,9 @@ class SearchOverlay:
|
||||
self.view.find(text, backwards)
|
||||
|
||||
def find_next(self):
|
||||
if ui_operations.find_next:
|
||||
ui_operations.find_next(False)
|
||||
else:
|
||||
self.find(self.search_text, False)
|
||||
|
||||
def find_previous(self):
|
||||
if ui_operations.find_next:
|
||||
ui_operations.find_next(True)
|
||||
else:
|
||||
self.find(self.search_text, True)
|
||||
|
||||
|
||||
|
@ -518,8 +518,14 @@ class View:
|
||||
elif data.name is 'start_search':
|
||||
self.show_search()
|
||||
elif data.name is 'next_match':
|
||||
if ui_operations.find_next:
|
||||
ui_operations.find_next()
|
||||
else:
|
||||
self.search_overlay.find_next()
|
||||
elif data.name is 'previous_match':
|
||||
if ui_operations.find_next:
|
||||
ui_operations.find_next(True)
|
||||
else:
|
||||
self.search_overlay.find_previous()
|
||||
elif data.name is 'increase_font_size':
|
||||
self.bump_font_size({'increase': True})
|
||||
|
Loading…
x
Reference in New Issue
Block a user