|
|
|
@ -540,6 +540,19 @@ function CreDocument:findText(pattern, origin, reverse, caseInsensitive)
|
|
|
|
|
pattern, origin, reverse, caseInsensitive and 1 or 0)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function CreDocument:enableInternalHistory(toggle)
|
|
|
|
|
-- Setting this to 0 unsets crengine internal bookmarks highlighting,
|
|
|
|
|
-- and as a side effect, disable internal history and the need to build
|
|
|
|
|
-- a bookmark at each page turn: this speeds up a lot page turning
|
|
|
|
|
-- and menu opening on big books.
|
|
|
|
|
-- It has to be called late in the document opening process, and setting
|
|
|
|
|
-- it to false needs to be followed by a redraw.
|
|
|
|
|
-- It needs to be temporarily re-enabled on page resize for crengine to
|
|
|
|
|
-- keep track of position in page and restore it after resize.
|
|
|
|
|
logger.dbg("CreDocument: set bookmarks highlight and internal history", toggle)
|
|
|
|
|
self._document:setIntProperty("crengine.highlight.bookmarks", toggle and 2 or 0)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function CreDocument:register(registry)
|
|
|
|
|
registry:addProvider("azw", "application/vnd.amazon.mobi8-ebook", self, 90)
|
|
|
|
|
registry:addProvider("chm", "application/vnd.ms-htmlhelp", self, 90)
|
|
|
|
|