Hyphenation: add custom hyphenation rules (#7746)

The hyphenation of a word can be changed from its default
by long pressing for 3 seconds and selecting 'Hyphenate'.
These overrides are stored in a per-language file, i.e:
koreader/settings/user-German.hyph.
This commit is contained in:
zwim
2021-05-31 20:34:26 +02:00
committed by GitHub
parent b30e366ccd
commit f25da5d0d5
39 changed files with 355 additions and 256 deletions

View File

@@ -467,16 +467,16 @@ function UIManager:close(widget, refreshtype, refreshregion, refreshdither)
end
logger.dbg("close widget:", widget.name or widget.id or tostring(widget))
local dirty = false
-- First notify the closed widget to save its settings...
-- Ensure all the widgets can get onFlushSettings event.
widget:handleEvent(Event:new("FlushSettings"))
-- ...and notify it that it ought to be gone now.
-- first send close event to widget
widget:handleEvent(Event:new("CloseWidget"))
-- Make sure it's disabled by default and check if there are any widgets that want it disabled or enabled.
-- make it disabled by default and check if any widget wants it disabled or enabled
Input.disable_double_tap = true
local requested_disable_double_tap = nil
local is_covered = false
local start_idx = 1
-- Then remove all references to that widget on stack and refresh.
-- then remove all references to that widget on stack and refresh
for i = #self._window_stack, 1, -1 do
if self._window_stack[i].widget == widget then
self._dirty[self._window_stack[i].widget] = nil