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)
|
self.view.find(text, backwards)
|
||||||
|
|
||||||
def find_next(self):
|
def find_next(self):
|
||||||
if ui_operations.find_next:
|
|
||||||
ui_operations.find_next(False)
|
|
||||||
else:
|
|
||||||
self.find(self.search_text, False)
|
self.find(self.search_text, False)
|
||||||
|
|
||||||
def find_previous(self):
|
def find_previous(self):
|
||||||
if ui_operations.find_next:
|
|
||||||
ui_operations.find_next(True)
|
|
||||||
else:
|
|
||||||
self.find(self.search_text, True)
|
self.find(self.search_text, True)
|
||||||
|
|
||||||
|
|
||||||
|
@ -518,8 +518,14 @@ class View:
|
|||||||
elif data.name is 'start_search':
|
elif data.name is 'start_search':
|
||||||
self.show_search()
|
self.show_search()
|
||||||
elif data.name is 'next_match':
|
elif data.name is 'next_match':
|
||||||
|
if ui_operations.find_next:
|
||||||
|
ui_operations.find_next()
|
||||||
|
else:
|
||||||
self.search_overlay.find_next()
|
self.search_overlay.find_next()
|
||||||
elif data.name is 'previous_match':
|
elif data.name is 'previous_match':
|
||||||
|
if ui_operations.find_next:
|
||||||
|
ui_operations.find_next(True)
|
||||||
|
else:
|
||||||
self.search_overlay.find_previous()
|
self.search_overlay.find_previous()
|
||||||
elif data.name is 'increase_font_size':
|
elif data.name is 'increase_font_size':
|
||||||
self.bump_font_size({'increase': True})
|
self.bump_font_size({'increase': True})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user