[UX] Gesture manager: add action - fulltext search (#4715)

Fixes #4687.
This commit is contained in:
Frans de Jonge
2019-03-02 21:36:30 +01:00
committed by GitHub
parent c9de46d656
commit e96ac7e7dc
2 changed files with 18 additions and 8 deletions

View File

@@ -42,6 +42,7 @@ local action_strings = {
dictionary_lookup = _("Dictionary lookup"),
wikipedia_lookup = _("Wikipedia lookup"),
fulltext_search = _("Fulltext search"),
full_refresh = _("Full screen refresh"),
night_mode = _("Night mode"),
@@ -282,6 +283,7 @@ function ReaderGesture:buildMenu(ges, default)
{"dictionary_lookup", true},
{"wikipedia_lookup", true, true},
{"fulltext_search", not self.is_docless, true},
{"full_refresh", true},
{"night_mode", true},
@@ -567,6 +569,8 @@ function ReaderGesture:gestureAction(action, ges)
self.ui:handleEvent(Event:new("ShowDictionaryLookup"))
elseif action == "wikipedia_lookup" then
self.ui:handleEvent(Event:new("ShowWikipediaLookup"))
elseif action == "fulltext_search" then
self.ui:handleEvent(Event:new("ShowFulltextSearchInput"))
elseif action == "show_menu" then
if self.ges_mode == "gesture_fm" then
self.ui:handleEvent(Event:new("ShowMenu"))