mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
decouple UI definitions from document modules
This commit is contained in:
committed by
Frans de Jonge
parent
02eca23649
commit
9e57e56f95
@@ -1,7 +1,6 @@
|
||||
local Blitbuffer = require("ffi/blitbuffer")
|
||||
local Document = require("document/document")
|
||||
local DrawContext = require("ffi/drawcontext")
|
||||
local KoptOptions = require("ui/data/koptoptions")
|
||||
|
||||
local DjvuDocument = Document:new{
|
||||
_document = false,
|
||||
@@ -9,7 +8,6 @@ local DjvuDocument = Document:new{
|
||||
is_djvu = true,
|
||||
djvulibre_cache_size = nil,
|
||||
dc_null = DrawContext.new(),
|
||||
options = KoptOptions,
|
||||
koptinterface = nil,
|
||||
color_bb_type = Blitbuffer.TYPE_BBRGB24,
|
||||
provider = "djvulibre",
|
||||
@@ -30,7 +28,7 @@ function DjvuDocument:init()
|
||||
self:updateColorRendering()
|
||||
local djvu = require("libs/libkoreader-djvu")
|
||||
self.koptinterface = require("document/koptinterface")
|
||||
self.configurable:loadDefaults(self.options)
|
||||
self.koptinterface:setDefaultConfigurable(self.configurable)
|
||||
if not validDjvuFile(self.file) then
|
||||
error("Not a valid DjVu file")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user