mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CLuaInstance: Display warning when using a obsolete parameter...
...in cwindow/ctext/cpicture:hide()
This commit is contained in:
@@ -148,15 +148,12 @@ int CLuaInstCCPicture::CCPictureHide(lua_State *L)
|
|||||||
lua_assert(lua_istable(L,1));
|
lua_assert(lua_istable(L,1));
|
||||||
CLuaCCPicture *D = CCPictureCheck(L, 1);
|
CLuaCCPicture *D = CCPictureCheck(L, 1);
|
||||||
if (!D) return 0;
|
if (!D) return 0;
|
||||||
#if 0
|
|
||||||
bool no_restore = false;
|
bool tmp1 = false;
|
||||||
if (!tableLookup(L, "no_restore", no_restore)) {
|
std::string tmp2 = "false";
|
||||||
std::string tmp = "false";
|
if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2)))
|
||||||
if (tableLookup(L, "no_restore", tmp))
|
printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "cpicture");
|
||||||
paramBoolDeprecated(L, tmp.c_str());
|
|
||||||
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (D->parent) {
|
if (D->parent) {
|
||||||
D->cp->setPicture("");
|
D->cp->setPicture("");
|
||||||
D->cp->paint();
|
D->cp->paint();
|
||||||
|
@@ -173,15 +173,12 @@ int CLuaInstCCText::CCTextHide(lua_State *L)
|
|||||||
lua_assert(lua_istable(L,1));
|
lua_assert(lua_istable(L,1));
|
||||||
CLuaCCText *D = CCTextCheck(L, 1);
|
CLuaCCText *D = CCTextCheck(L, 1);
|
||||||
if (!D) return 0;
|
if (!D) return 0;
|
||||||
#if 0
|
|
||||||
bool no_restore = false;
|
bool tmp1 = false;
|
||||||
if (!tableLookup(L, "no_restore", no_restore)) {
|
std::string tmp2 = "false";
|
||||||
std::string tmp = "false";
|
if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2)))
|
||||||
if (tableLookup(L, "no_restore", tmp))
|
printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "ctext");
|
||||||
paramBoolDeprecated(L, tmp.c_str());
|
|
||||||
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (D->parent) {
|
if (D->parent) {
|
||||||
D->ct->setText("", D->mode, g_Font[D->font_text]);
|
D->ct->setText("", D->mode, g_Font[D->font_text]);
|
||||||
D->ct->paint();
|
D->ct->paint();
|
||||||
|
@@ -196,15 +196,12 @@ int CLuaInstCCWindow::CCWindowHide(lua_State *L)
|
|||||||
lua_assert(lua_istable(L,1));
|
lua_assert(lua_istable(L,1));
|
||||||
CLuaCCWindow *D = CCWindowCheck(L, 1);
|
CLuaCCWindow *D = CCWindowCheck(L, 1);
|
||||||
if (!D) return 0;
|
if (!D) return 0;
|
||||||
#if 0
|
|
||||||
bool no_restore = false;
|
bool tmp1 = false;
|
||||||
if (!tableLookup(L, "no_restore", no_restore)) {
|
std::string tmp2 = "false";
|
||||||
std::string tmp = "false";
|
if ((tableLookup(L, "no_restore", tmp1)) || (tableLookup(L, "no_restore", tmp2)))
|
||||||
if (tableLookup(L, "no_restore", tmp))
|
printf("[%s:hide] Warning, obsolete parameter in use, please remove!\n", "cwindow");
|
||||||
paramBoolDeprecated(L, tmp.c_str());
|
|
||||||
no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
D->w->hide();
|
D->w->hide();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user