From 7a1fed715f1ce686721c76f071bc5b5709cb0a23 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 17 Sep 2015 12:01:13 +0200 Subject: [PATCH] CLuaInstance: simplified error message handler use DisplayErrorMessage() instead full call of ShowMsg. Signed-off-by: M. Liebmann --- src/gui/luainstance.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index bce5ba23f..e5c397e87 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -435,7 +435,7 @@ void CLuaInstance::runScript(const char *fileName, std::vector *arg int status = luaL_loadfile(lua, fileName); if (status) { fprintf(stderr, "[CLuaInstance::%s] Can't load file: %s\n", __func__, lua_tostring(lua, -1)); - ShowMsg2UTF("Lua script error:", lua_tostring(lua, -1), CMsgBox::mbrBack, CMsgBox::mbBack); + DisplayErrorMessage(lua_tostring(lua, -1), "Lua Script Error:"); if (error_string) *error_string = std::string(lua_tostring(lua, -1)); return; @@ -466,7 +466,7 @@ void CLuaInstance::runScript(const char *fileName, std::vector *arg if (status) { fprintf(stderr, "[CLuaInstance::%s] error in script: %s\n", __func__, lua_tostring(lua, -1)); - ShowMsg2UTF("Lua script error:", lua_tostring(lua, -1), CMsgBox::mbrBack, CMsgBox::mbBack); + DisplayErrorMessage(lua_tostring(lua, -1), "Lua Script Error:"); if (error_string) *error_string = std::string(lua_tostring(lua, -1)); } @@ -2686,7 +2686,7 @@ int CLuaInstance::checkVersion(lua_State *L) LUA_API_VERSION_MAJOR, LUA_API_VERSION_MINOR, g_Locale->getText(LOCALE_LUA_VERSIONSCHECK2), major, minor); - ShowMsg(LOCALE_MESSAGEBOX_ERROR, msg, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_ERROR); + DisplayErrorMessage(msg, "Lua Script Error:"); } lua_pushinteger(L, ret); return 1;