[UX] FileManager menu: split Settings tab into 2 tabs (#3836)

pull/3837/head
poire-z 6 years ago committed by Frans de Jonge
parent 38a0519062
commit 6a997cf609

@ -24,6 +24,9 @@ function FileManagerMenu:init()
-- top menu -- top menu
}, },
-- items in top menu -- items in top menu
filemanager_settings = {
icon = "resources/icons/appbar.cabinet.files.png",
},
setting = { setting = {
icon = "resources/icons/appbar.settings.png", icon = "resources/icons/appbar.settings.png",
}, },

@ -1,12 +1,13 @@
local order = { local order = {
["KOMenu:menu_buttons"] = { ["KOMenu:menu_buttons"] = {
"filemanager_settings",
"setting", "setting",
"tools", "tools",
"search", "search",
"plus_menu", "plus_menu",
"main", "main",
}, },
setting = { filemanager_settings = {
"filemanager_display_mode", "filemanager_display_mode",
"show_hidden_files", "show_hidden_files",
"items_per_page", "items_per_page",
@ -15,8 +16,8 @@ local order = {
"reverse_sorting", "reverse_sorting",
"----------------------------", "----------------------------",
"start_with", "start_with",
"screensaver", },
"----------------------------", setting = {
-- common settings -- common settings
-- those that don't exist will simply be skipped during menu gen -- those that don't exist will simply be skipped during menu gen
"frontlight", -- if Device:hasFrontlight() "frontlight", -- if Device:hasFrontlight()
@ -24,6 +25,7 @@ local order = {
"----------------------------", "----------------------------",
"network", "network",
"screen", "screen",
"screensaver",
"document", "document",
"----------------------------", "----------------------------",
"language", "language",

@ -337,7 +337,7 @@ function TouchMenuBar:switchToTab(index)
-- a little safety check -- a little safety check
-- don't auto-activate a non-existent index -- don't auto-activate a non-existent index
if index > #self.icon_widgets then if index > #self.icon_widgets then
index = 1 index = #self.icon_widgets
end end
self.icon_widgets[index].callback() self.icon_widgets[index].callback()
end end

Loading…
Cancel
Save