disable word OCR for now

Since it will crash the reader with a strange error message saying
"terminate called after throwing an instance of 'DJVU::GException'"
even though only PDF file is opened.
pull/85/head
chrox 11 years ago
parent 936dfc6fd1
commit 46c605d256

@ -12,7 +12,7 @@ end
function ReaderDictionary:onLookupWord(word)
DEBUG("lookup word:", word)
if self.lipc_handle then
if self.lipc_handle and word then
-- start indicator depends on pillow being enabled
self.lipc_handle:set_string_property(
"com.lab126.booklet.kpvbooklet.dict", "lookup", word)

@ -81,7 +81,7 @@ function ReaderHighlight:onHold(arg, ges)
word_box.y = word_box.y - math.floor(word_box.h * 0.02)
word_box.w = word_box.w + math.floor(word_box.h * 0.04)
word_box.h = word_box.h + math.floor(word_box.h * 0.04)
local word = self.ui.document:getOCRWord(self.pos.page, word_box)
-- local word = self.ui.document:getOCRWord(self.pos.page, word_box)
DEBUG("OCRed word:", word)
self.ui:handleEvent(Event:new("LookupWord", word))
end)

Loading…
Cancel
Save