diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 2662476df..a0785436c 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -533,6 +534,7 @@ const luaL_Reg CLuaInstance::methods[] = { "strSub", CLuaInstance::strSub }, { "checkVersion", CLuaInstance::checkVersion }, { "createChannelIDfromUrl", CLuaInstance::createChannelIDfromUrl }, + { "enableInfoClock", CLuaInstance::enableInfoClock }, { NULL, NULL } }; @@ -2747,3 +2749,15 @@ int CLuaInstance::createChannelIDfromUrl(lua_State *L) } // -------------------------------------------------------------------------------- + +int CLuaInstance::enableInfoClock(lua_State *L) +{ + bool enable = true; + int numargs = lua_gettop(L); + if (numargs > 1) + enable = _luaL_checkbool(L, 2); + CInfoClock::getInstance()->enableInfoClock(enable); + return 0; +} + +// -------------------------------------------------------------------------------- diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index 58a346822..1c0887d72 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -34,7 +34,7 @@ extern "C" { #include #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 7 +#define LUA_API_VERSION_MINOR 8 /* this is stored as userdata in the lua_State */ struct CLuaData @@ -321,6 +321,7 @@ private: static int checkVersion(lua_State *L); static int createChannelIDfromUrl(lua_State *L); + static int enableInfoClock(lua_State *L); }; #endif /* _LUAINSTANCE_H */