mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Misc: Get rid of the legacy defaults.lua globals (#9546)
* This removes support for the following deprecated constants: `DTAP_ZONE_FLIPPING`, `DTAP_ZONE_BOOKMARK`, `DCREREADER_CONFIG_DEFAULT_FONT_GAMMA` * The "Advanced settings" panel now highlights modified values in bold (think about:config in Firefox ;)). * LuaData: Isolate global table lookup shenanigans, and fix a few issues in unused-in-prod codepaths. * CodeStyle: Require module locals for Lua/C modules, too. * ScreenSaver: Actually garbage collect our widget on close (ScreenSaver itself is not an instantiated object). * DateTimeWidget: Code cleanups to ensure child widgets can be GC'ed.
This commit is contained in:
10
reader.lua
10
reader.lua
@@ -21,18 +21,16 @@ local userpatch = require("userpatch")
|
||||
userpatch.applyPatches(userpatch.early_once)
|
||||
userpatch.applyPatches(userpatch.early)
|
||||
|
||||
-- Load default settings
|
||||
require("defaults")
|
||||
local DataStorage = require("datastorage")
|
||||
pcall(dofile, DataStorage:getDataDir() .. "/defaults.persistent.lua")
|
||||
|
||||
|
||||
io.stdout:write(" [*] Version: ", require("version"):getCurrentRevision(), "\n\n")
|
||||
io.stdout:flush()
|
||||
|
||||
-- Load default settings
|
||||
G_defaults = require("luadefaults"):open()
|
||||
|
||||
-- Read settings and check for language override
|
||||
-- Has to be done before requiring other files because
|
||||
-- they might call gettext on load
|
||||
local DataStorage = require("datastorage")
|
||||
G_reader_settings = require("luasettings"):open(
|
||||
DataStorage:getDataDir().."/settings.reader.lua")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user