display document open error message

pull/2/merge
HW 12 years ago
parent 4714057f5b
commit 676e4268ff

@ -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

Loading…
Cancel
Save