mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00: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:
@@ -151,6 +151,7 @@ When the book's language tag is not among our presets, no specific features will
|
||||
-- Show infos about TextLangMan seen lang_tags and loaded hyph dicts
|
||||
local lang_infos = {}
|
||||
local seen_hyph_dicts = {} -- to avoid outputing count and size for shared hyph dicts
|
||||
local cre = require("document/credocument"):engineInit()
|
||||
local main_lang_tag, main_lang_active_hyph_dict, loaded_lang_infos = cre.getTextLangStatus() -- luacheck: no unused
|
||||
-- First output main lang tag
|
||||
local main_lang_info = loaded_lang_infos[main_lang_tag]
|
||||
@@ -360,6 +361,7 @@ When the book's language tag is not among our presets, no specific features will
|
||||
end,
|
||||
callback = function()
|
||||
local DoubleSpinWidget = require("/ui/widget/doublespinwidget")
|
||||
local cre = require("document/credocument"):engineInit()
|
||||
local hyph_alg, alg_left_hyphen_min, alg_right_hyphen_min = cre.getSelectedHyphDict() -- luacheck: no unused
|
||||
local hyph_limits_widget = DoubleSpinWidget:new{
|
||||
-- Min (1) and max (10) values are enforced by crengine
|
||||
|
||||
Reference in New Issue
Block a user