summaryrefslogtreecommitdiff
path: root/lua-interface-light.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua-interface-light.lua')
-rw-r--r--lua-interface-light.lua22
1 files changed, 15 insertions, 7 deletions
diff --git a/lua-interface-light.lua b/lua-interface-light.lua
index ae115f9..b34baf9 100644
--- a/lua-interface-light.lua
+++ b/lua-interface-light.lua
@@ -142,23 +142,31 @@ local function generate_dlg()
}
end
-function lua_interface_light_main()
- local dlg = generate_dlg()
+function lua_interface_light_main(passthru)
+ if not passthru then
+ local dlg = generate_dlg()
- dlg:show()
- iup.MainLoop()
- dlg:hide()
+ dlg:show()
+ iup.MainLoop()
+ dlg:hide()
+ else
+ okay = true
+ end
if commandline then return true end
if not okay then return false end
- if not pcall(Archive, input_file_text.value) then
- error(error_not_archive_locale[system_locale])
+ if not passthru then
+ if not pcall(Archive, input_file_text.value) then
+ error(error_not_archive_locale[system_locale])
+ end
end
if not pcall(load, "archive_main.lua") then
+ if passthru then return lua_interface_light_main(false) end
error(error_wrong_archive_locale[system_locale])
end
if not type(archive_main) == "function" then
+ if passthru then return lua_interface_light_main(false) end
error(error_bad_lua_locale[system_locale])
end