only set two pages mode for crengine in kindle dxg

pull/186/head
Qingping Hou 11 years ago
parent 060b8db3b1
commit a8a589c27b

@ -227,6 +227,10 @@ function CreDocument:setPageMargins(left, top, right, bottom)
self._document:setPageMargins(left, top, right, bottom)
end
function CreDocument:setVisiblePageCount(new_count)
self._document:setVisiblePageCount(new_count)
end
DocumentRegistry:addProvider("txt", "application/txt", CreDocument)
DocumentRegistry:addProvider("epub", "application/epub", CreDocument)
DocumentRegistry:addProvider("html", "application/html", CreDocument)

@ -98,7 +98,7 @@ function ReaderUI:init()
ui = self
}
table.insert(self, reader_bm)
-- text highlight
-- text highlight
local highlight = ReaderHighlight:new{
dialog = self.dialog,
view = self[1],
@ -106,7 +106,7 @@ function ReaderUI:init()
document = self.document,
}
table.insert(self, highlight)
-- dictionary
-- dictionary
local dict = ReaderDictionary:new{
dialog = self.dialog,
view = self[1],
@ -170,6 +170,9 @@ function ReaderUI:init()
}
table.insert(self, hinter)
else
if Device:getModel() ~= "KindleDXG" then
self.document:setVisiblePageCount(1)
end
-- make sure we load document first before calling any callback
table.insert(self.postInitCallback, function()
self.document:loadDocument()

Loading…
Cancel
Save