summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/lua/include_lua/menucoresettings.lua18
-rw-r--r--apps/plugins/lua/include_lua/rbsettings.lua7
2 files changed, 17 insertions, 8 deletions
diff --git a/apps/plugins/lua/include_lua/menucoresettings.lua b/apps/plugins/lua/include_lua/menucoresettings.lua
index 13f3b8ea69..27d5e86ca1 100644
--- a/apps/plugins/lua/include_lua/menucoresettings.lua
+++ b/apps/plugins/lua/include_lua/menucoresettings.lua
@@ -39,21 +39,27 @@ local function get_core_settings()
tmploader("rbsettings")
tmploader("settings")
+ -- these are exact matches color and talk are wildcard matches
+ local list_settings = "cursor_style|show_icons|statusbar|scrollbar|scrollbar_width|list_separator_height|backdrop_file|"
+ local function filterfn(struct, k)
+ k = k or ""
+ --rbold.splash(100, struct .. " " .. k)
+ return (k:find("color") or k:find("talk") or list_settings:find(k))
+ end
+ local rb_settings = rb.settings.dump('global_settings', "system", nil, nil, filterfn)
- local rb_settings = rb.settings.dump('global_settings', "system")
local color_table = {}
local talk_table = {}
local list_settings_table = {}
- local list_settings = "cursor_style|show_icons|statusbar|scrollbar|scrollbar_width|list_separator_height|backdrop_file|"
for key, value in pairs(rb_settings) do
key = key or ""
if (key:find("color")) then
- color_table[key]=value
+ color_table[key]=value
elseif (key:find("talk")) then
- talk_table[key]=value
- elseif (list_settings:find(key)) then
- list_settings_table[key]=value
+ talk_table[key]=value
+ else --if (list_settings:find(key)) then
+ list_settings_table[key]=value
end
end
diff --git a/apps/plugins/lua/include_lua/rbsettings.lua b/apps/plugins/lua/include_lua/rbsettings.lua
index defdb11b77..995e5023c9 100644
--- a/apps/plugins/lua/include_lua/rbsettings.lua
+++ b/apps/plugins/lua/include_lua/rbsettings.lua
@@ -151,12 +151,15 @@ function rb.settings.read(s_settings, s_var, s_groupname)
return data
end
-function rb.settings.dump(s_settings, s_groupname, s_structname, t_output)
+function rb.settings.dump(s_settings, s_groupname, s_structname, t_output, fn_filter)
t_output = t_output or {}
+ fn_filter = fn_filter or function(s,k) return true end
local tgroup = rb[s_groupname]
s_structname = s_structname or s_settings
for k, v in pairs(tgroup[s_structname]) do
- t_output[k] = rb.settings.read(s_settings, v, s_groupname)
+ if fn_filter(s_structname, k) then
+ t_output[k] = rb.settings.read(s_settings, v, s_groupname)
+ end
end
return t_output
end