From ce452111b9ed5ee5ebc8c55d6abb44262f3f759d Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 9 Nov 2009 08:41:06 +0100 Subject: Actually running this new script. --- lua-interface-light.lua | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'lua-interface-light.lua') 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 -- cgit v1.2.3