diff --git a/frontend/apps/filemanager/filemanager.lua b/frontend/apps/filemanager/filemanager.lua index a8298f47a..52717679b 100644 --- a/frontend/apps/filemanager/filemanager.lua +++ b/frontend/apps/filemanager/filemanager.lua @@ -825,6 +825,7 @@ function FileManager:getStartWithMenuTable() local start_withs = { filemanager = {_("file browser"), _("Start with file browser")}, history = {_("history"), _("Start with history")}, + folder_shortcuts = {_("folder shortcuts"), _("Start with folder shortcuts")}, last = {_("last file"), _("Start with last file")}, } local set_sw_table = function(start_with) @@ -849,6 +850,7 @@ function FileManager:getStartWithMenuTable() sub_item_table = { set_sw_table("filemanager"), set_sw_table("history"), + set_sw_table("folder_shortcuts"), set_sw_table("last"), } } diff --git a/reader.lua b/reader.lua index 69227b58b..934e8ac18 100755 --- a/reader.lua +++ b/reader.lua @@ -190,6 +190,21 @@ if ARGV[argidx] and ARGV[argidx] ~= "" then UIManager:nextTick(function() FileManagerHistory:onShowHist(last_file) end) + elseif start_with == "folder_shortcuts" then + local FileManagerShortcuts = require("apps/filemanager/filemanagershortcuts") + local fm_bookmark = FileManagerShortcuts:new{ + title = _("Folder shortcuts"), + show_parent = FileManager, + curr_path = home_dir, + goFolder = function(folder) + if folder ~= nil and lfs.attributes(folder, "mode") == "directory" then + FileManager.instance.file_chooser:changeToPath(folder) + end + end, + } + UIManager:nextTick(function() + UIManager:show(fm_bookmark) + end) end end exit_code = UIManager:run()