Keep g_settings as a 'static' variable rather than a direct object.

This commit is contained in:
BenDol
2014-04-01 16:51:38 +13:00
parent b295053662
commit 79ee0e34ea
18 changed files with 174 additions and 99 deletions

View File

@@ -64,7 +64,7 @@ function init()
installLocales('/locales')
local userLocaleName = g_settings:get('locale', 'false')
local userLocaleName = g_settings.get('locale', 'false')
if userLocaleName ~= 'false' and setLocale(userLocaleName) then
pdebug('Using configured locale: ' .. userLocaleName)
else
@@ -150,7 +150,7 @@ function setLocale(name)
sendLocale(locale.name)
end
currentLocale = locale
g_settings:set('locale', name)
g_settings.set('locale', name)
if onLocaleChanged then onLocaleChanged(name) end
return true
end