quiet some of the logging in ThemePrefs
This commit is contained in:
@@ -43,7 +43,7 @@ local function ResolveTable( pref )
|
||||
local val = PrefsTable[name][pref]
|
||||
|
||||
if val ~= nil then
|
||||
Trace( ("ResolveTable(%s): found in %s"):format(pref,name) )
|
||||
--Trace( ("ResolveTable(%s): found in %s"):format(pref,name) )
|
||||
return PrefsTable[name]
|
||||
end
|
||||
|
||||
@@ -51,7 +51,7 @@ local function ResolveTable( pref )
|
||||
if PrefsTable[FallbackTheme] then
|
||||
val = PrefsTable[FallbackTheme][pref]
|
||||
if val ~= nil then
|
||||
Trace( ("ResolveTable(%s): found in fallback"):format(pref) )
|
||||
--Trace( ("ResolveTable(%s): found in fallback"):format(pref) )
|
||||
return PrefsTable[FallbackTheme]
|
||||
end
|
||||
end
|
||||
@@ -61,7 +61,7 @@ local function ResolveTable( pref )
|
||||
for section, _ in pairs(PrefsTable) do
|
||||
val = PrefsTable[section][pref]
|
||||
if val ~= nil then
|
||||
Trace( ("ResolveTable(%s): found in section %s"):format(pref,section) )
|
||||
--Trace( ("ResolveTable(%s): found in section %s"):format(pref,section) )
|
||||
return PrefsTable[section] end
|
||||
end
|
||||
|
||||
@@ -94,7 +94,7 @@ ThemePrefs =
|
||||
local section = GetThemeName()
|
||||
PrefsTable[section] = PrefsTable[section] and PrefsTable[section] or { }
|
||||
|
||||
Trace( "Using section " .. section )
|
||||
--Trace( "Using section " .. section )
|
||||
|
||||
-- if the key doesn't exist, add it with our default value
|
||||
for k, tbl in pairs(prefs) do
|
||||
@@ -104,7 +104,7 @@ ThemePrefs =
|
||||
end
|
||||
end
|
||||
|
||||
PrintTable( PrefsTable[section] )
|
||||
--PrintTable( PrefsTable[section] )
|
||||
end,
|
||||
|
||||
Load = function()
|
||||
@@ -129,7 +129,7 @@ ThemePrefs =
|
||||
end,
|
||||
|
||||
Get = function( name )
|
||||
Trace( ("ThemePrefs.Get(%s)"):format(name) )
|
||||
--Trace( ("ThemePrefs.Get(%s)"):format(name) )
|
||||
local tbl = ResolveTable(name)
|
||||
if tbl then return tbl[name] end
|
||||
Warn( "Get: "..GetString("UnknownPreference"):format(name) )
|
||||
@@ -137,7 +137,7 @@ ThemePrefs =
|
||||
end,
|
||||
|
||||
Set = function( name, value )
|
||||
Trace( ("ThemePrefs.Set(%s, %s)"):format(name, tostring(value)) )
|
||||
--Trace( ("ThemePrefs.Set(%s, %s)"):format(name, tostring(value)) )
|
||||
local tbl = ResolveTable(name)
|
||||
if tbl then tbl[name] = value; NeedsSaved = true; return end
|
||||
Warn( "Set: "..GetString("UnknownPreference"):format(name) )
|
||||
|
||||
Reference in New Issue
Block a user