Skip to content

Commit

Permalink
[UX] Gesture manager: add action - go to file browser (#4678)
Browse files Browse the repository at this point in the history
Fixes #4676.
  • Loading branch information
Frenzie committed Feb 28, 2019
1 parent a1f7f25 commit 32d813d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/apps/reader/modules/readergesture.lua
Expand Up @@ -52,6 +52,7 @@ local action_strings = {
zoom_content = _("Zoom to fit content"),
zoom_page = _("Zoom to fit page"),

filemanager = _("File browser"),
folder_up = _("Folder up"),
}

Expand Down Expand Up @@ -244,6 +245,7 @@ function ReaderGesture:buildMenu(ges, default)
{"previous_location", not self.is_docless},
{"latest_bookmark", not self.is_docless, true},

{"filemanager", not self.is_docless, true},
{"folder_up", self.is_docless, true},

{ "toc", not self.is_docless},
Expand Down Expand Up @@ -508,6 +510,9 @@ function ReaderGesture:gestureAction(action)
self.ui:handleEvent(Event:new("GoBackLink"))
elseif action == "latest_bookmark" then
self.ui.link:onGoToLatestBookmark()
elseif action == "filemanager" then
self.ui:onClose()
self.ui:showFileManager()
elseif action == "folder_up" then
self.ui.file_chooser:changeToPath(string.format("%s/..", self.ui.file_chooser.path))
elseif action == "open_previous_document" then
Expand Down

0 comments on commit 32d813d

Please sign in to comment.