From 69d11ebfd9ddd0b5be7029a44d8a7ec33d99e735 Mon Sep 17 00:00:00 2001 From: poire-z Date: Wed, 26 Aug 2020 20:44:56 +0200 Subject: [PATCH] Start with: add Favorites --- frontend/apps/filemanager/filemanager.lua | 2 ++ reader.lua | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/frontend/apps/filemanager/filemanager.lua b/frontend/apps/filemanager/filemanager.lua index da1af7de8..5fb1e454c 100644 --- a/frontend/apps/filemanager/filemanager.lua +++ b/frontend/apps/filemanager/filemanager.lua @@ -1010,6 +1010,7 @@ function FileManager:getStartWithMenuTable() local start_withs = { filemanager = {_("file browser"), _("Start with file browser")}, history = {_("history"), _("Start with history")}, + favorites = {_("favorites"), _("Start with favorites")}, folder_shortcuts = {_("folder shortcuts"), _("Start with folder shortcuts")}, last = {_("last file"), _("Start with last file")}, } @@ -1035,6 +1036,7 @@ function FileManager:getStartWithMenuTable() sub_item_table = { set_sw_table("filemanager"), set_sw_table("history"), + set_sw_table("favorites"), set_sw_table("folder_shortcuts"), set_sw_table("last"), } diff --git a/reader.lua b/reader.lua index 147cb86c5..c9ea466cd 100755 --- a/reader.lua +++ b/reader.lua @@ -292,6 +292,13 @@ if ARGV[argidx] and ARGV[argidx] ~= "" then UIManager:nextTick(function() FileManagerHistory:onShowHist(last_file) end) + elseif start_with == "favorites" then + local FileManagerCollection = require("apps/filemanager/filemanagercollection") + UIManager:nextTick(function() + FileManagerCollection:new{ + ui = FileManager.instance, + }:onShowColl("favorites") + end) elseif start_with == "folder_shortcuts" then local FileManagerShortcuts = require("apps/filemanager/filemanagershortcuts") UIManager:nextTick(function()