mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
display document open error message
This commit is contained in:
@@ -10,6 +10,7 @@ function InfoMessage:show(text)
|
||||
dimen = { w = G_width, h = G_height },
|
||||
FrameContainer:new({
|
||||
margin = 2,
|
||||
background = 0,
|
||||
HorizontalGroup:new({
|
||||
align = "center",
|
||||
ImageWidget:new({
|
||||
|
||||
@@ -26,6 +26,7 @@ require "settings"
|
||||
require "screen"
|
||||
require "keys"
|
||||
require "commands"
|
||||
require "dialog"
|
||||
|
||||
-- option parsing:
|
||||
longopts = {
|
||||
@@ -55,7 +56,9 @@ function openFile(filename)
|
||||
reader_settings:savesetting("lastfile", filename)
|
||||
return reader:inputLoop()
|
||||
else
|
||||
-- TODO: error handling
|
||||
InfoMessage:show("Error opening document.")
|
||||
fb:refresh(0)
|
||||
util.sleep(2)
|
||||
end
|
||||
end
|
||||
return true -- on failed attempts, we signal to keep running
|
||||
|
||||
Reference in New Issue
Block a user