mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
CLuaInstance: Add script function 'paramDeprecated'
This commit is contained in:
@@ -871,6 +871,7 @@ lua.boolparam_deprecated3 für einen Boolean Parameter ist veraltet.\n
|
||||
lua.function_deprecated1 Achtung!
|
||||
lua.function_deprecated2 Die Funktion
|
||||
lua.function_deprecated3 ist veraltet,\n bitte nutzen Sie
|
||||
lua.parameter_deprecated2 Der Parameter
|
||||
lua.versionscheck1 Ihre Lua API Version ist zu alt
|
||||
lua.versionscheck2 Erforderlich ist mindestens
|
||||
mainmenu.audioplayer Audioplayer
|
||||
|
@@ -872,6 +872,7 @@ lua.boolparam_deprecated3 for a Boolean parameter is deprecated.\n
|
||||
lua.function_deprecated1 Caution!
|
||||
lua.function_deprecated2 Function
|
||||
lua.function_deprecated3 is deprecated,\n please use
|
||||
lua.parameter_deprecated2 Parameter
|
||||
lua.versionscheck1 Your Lua API version is too old
|
||||
lua.versionscheck2 This requires at least
|
||||
mainmenu.audioplayer Audioplayer
|
||||
|
@@ -418,6 +418,18 @@ void CLuaInstance::functionDeprecated(lua_State *L, const char* oldFunc, const c
|
||||
ar.short_src, ar.currentline);
|
||||
}
|
||||
|
||||
void CLuaInstance::paramDeprecated(lua_State *L, const char* oldParam, const char* newParam)
|
||||
{
|
||||
lua_Debug ar;
|
||||
lua_getstack(L, 1, &ar);
|
||||
lua_getinfo(L, "Sl", &ar);
|
||||
printf("[Lua Script] \33[1;31m%s\33[0m %s \33[33m%s\33[0m %s \33[1;33m%s\33[0m.\n (%s:%d)\n",
|
||||
g_Locale->getText(LOCALE_LUA_FUNCTION_DEPRECATED1),
|
||||
g_Locale->getText(LOCALE_LUA_PARAMETER_DEPRECATED2), oldParam,
|
||||
g_Locale->getText(LOCALE_LUA_FUNCTION_DEPRECATED3), newParam,
|
||||
ar.short_src, ar.currentline);
|
||||
}
|
||||
|
||||
lua_Unsigned CLuaInstance::checkMagicMask(lua_Unsigned &col)
|
||||
{
|
||||
if ((col & MAGIC_MASK) == MAGIC_COLOR)
|
||||
|
@@ -212,6 +212,7 @@ private:
|
||||
static bool _luaL_checkbool(lua_State *L, int numArg);
|
||||
static void paramBoolDeprecated(lua_State *L, const char* val);
|
||||
static void functionDeprecated(lua_State *L, const char* oldFunc, const char* newFunc);
|
||||
static void paramDeprecated(lua_State *L, const char* oldParam, const char* newParam);
|
||||
static lua_Unsigned checkMagicMask(lua_Unsigned &col);
|
||||
|
||||
static int NewWindow(lua_State *L);
|
||||
|
@@ -899,6 +899,7 @@ typedef enum
|
||||
LOCALE_LUA_FUNCTION_DEPRECATED1,
|
||||
LOCALE_LUA_FUNCTION_DEPRECATED2,
|
||||
LOCALE_LUA_FUNCTION_DEPRECATED3,
|
||||
LOCALE_LUA_PARAMETER_DEPRECATED2,
|
||||
LOCALE_LUA_VERSIONSCHECK1,
|
||||
LOCALE_LUA_VERSIONSCHECK2,
|
||||
LOCALE_MAINMENU_AUDIOPLAYER,
|
||||
|
@@ -899,6 +899,7 @@ const char * locale_real_names[] =
|
||||
"lua.function_deprecated1",
|
||||
"lua.function_deprecated2",
|
||||
"lua.function_deprecated3",
|
||||
"lua.parameter_deprecated2",
|
||||
"lua.versionscheck1",
|
||||
"lua.versionscheck2",
|
||||
"mainmenu.audioplayer",
|
||||
|
Reference in New Issue
Block a user