summaryrefslogtreecommitdiff
path: root/lua-interface-light.lua
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2009-11-09 08:41:06 +0100
committerPixel <pixel@nobis-crew.org>2009-11-09 08:41:06 +0100
commitce452111b9ed5ee5ebc8c55d6abb44262f3f759d (patch)
tree4ca511035d15252d9965ac0ad58dd7c674afb0cc /lua-interface-light.lua
parent60a8d1a8916487cb83c35bbb19f16ac42f48eb84 (diff)
Actually running this new script.
Diffstat (limited to 'lua-interface-light.lua')
-rw-r--r--lua-interface-light.lua23
1 files changed, 20 insertions, 3 deletions
diff --git a/lua-interface-light.lua b/lua-interface-light.lua
index f4a019d..0aaa762 100644
--- a/lua-interface-light.lua
+++ b/lua-interface-light.lua
@@ -38,7 +38,13 @@ local error_bad_lua_locale = {
["frFR"] = "archive_main.lua ne contient pas de fonction archive_main",
}
+local commandline_locale = {
+ ["default"] = "Command line",
+ ["frFR"] = "Ligne de commande",
+}
+
local okay = false
+local commandline = false
local system_locale
local input_file_text
@@ -89,6 +95,11 @@ local function generate_dlg()
function quit_btn:action()
return iup.CLOSE
end
+ local commandline_btn = iup.button { title = commandline_locale[system_locale] }
+ function commandline_btn:action()
+ commandline = true
+ return iup.CLOSE
+ end
return iup.dialog {
iup.vbox {
@@ -110,7 +121,12 @@ local function generate_dlg()
quit_btn,
normalizesize = "Horizontal",
- }
+ },
+ iup.fill { size = "x2" },
+ iup.hbox {
+ iup.fill{},
+ commandline_btn,
+ },
},
resize = "No",
@@ -132,7 +148,8 @@ function lua_interface_light_main()
iup.MainLoop()
dlg:hide()
- if not okay then return 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])
@@ -144,5 +161,5 @@ function lua_interface_light_main()
error(error_bad_lua_locale[system_locale])
end
- archive_main()
+ return archive_main()
end