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