pass cache_document_size to document open

This is how mupdf API is structured
This commit is contained in:
Dobrica Pavlinusic
2012-03-31 14:09:50 +02:00
parent 4f0b41ebc5
commit 3e83dcc2a4
3 changed files with 4 additions and 6 deletions

View File

@@ -107,7 +107,7 @@ end
-- open a file and its settings store
-- tips: you can use self:loadSettings in open() method.
function UniReader:open(filename, password)
function UniReader:open(filename, cache_size)
return false
end
@@ -149,7 +149,7 @@ end
function UniReader:loadSettings(filename)
if self.doc ~= nil then
self.settings = DocSettings:open(filename)
self.settings = DocSettings:open(filename,self.cache_document_size)
local gamma = self.settings:readSetting("gamma")
if gamma then
@@ -169,8 +169,6 @@ function UniReader:loadSettings(filename)
self.globalzoom = self.settings:readSetting("globalzoom") or 1.0
self.globalzoommode = self.settings:readSetting("globalzoommode") or -1
self.doc:setCacheSize( self.cache_document_size )
return true
end
return false