add document settings support

pull/2/merge
Qingping Hou 12 years ago
parent ca46092f1b
commit fab19c3bfa

@ -40,6 +40,10 @@ function ReaderUI:init()
if not self.dialog then
self.dialog = self
end
self.doc_settings = DocSettings:open(self.document.file)
DEBUG(self.doc_settings)
-- a view container (so it must be child #1!)
self[1] = ReaderView:new{
dialog = self.dialog,
@ -121,6 +125,8 @@ end
function ReaderUI:onClose()
DEBUG("closing reader")
self:handleEvent(Event:new("CloseDocument"))
self.doc_settings:flush()
if self.document then
self.document:close()
self.document = false

Loading…
Cancel
Save