mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
CLuaInstance: Fix bool parameter in CWindow/SignalBox => paint()/hide()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 71e5f964ab
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2014-01-22 (Wed, 22 Jan 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1335,28 +1335,30 @@ CLuaCWindow *CLuaInstance::CWindowCheck(lua_State *L, int n)
|
||||
int CLuaInstance::CWindowPaint(lua_State *L)
|
||||
{
|
||||
lua_assert(lua_istable(L,1));
|
||||
int do_save_bg = 1;
|
||||
tableLookup(L, "do_save_bg", do_save_bg);
|
||||
std::string tmp = "true";
|
||||
tableLookup(L, "do_save_bg", tmp);
|
||||
bool do_save_bg = (tmp == "true" || tmp == "1" || tmp == "yes");
|
||||
|
||||
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||
if (!m)
|
||||
return 0;
|
||||
|
||||
m->w->paint((do_save_bg!=0)?true:false);
|
||||
m->w->paint(do_save_bg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int CLuaInstance::CWindowHide(lua_State *L)
|
||||
{
|
||||
lua_assert(lua_istable(L,1));
|
||||
int no_restore = 0;
|
||||
tableLookup(L, "no_restore", no_restore);
|
||||
std::string tmp = "false";
|
||||
tableLookup(L, "no_restore", tmp);
|
||||
bool no_restore = (tmp == "true" || tmp == "1" || tmp == "yes");
|
||||
|
||||
CLuaCWindow *m = CWindowCheck(L, 1);
|
||||
if (!m)
|
||||
return 0;
|
||||
|
||||
m->w->hide((no_restore!=0)?true:false);
|
||||
m->w->hide(no_restore);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1418,14 +1420,15 @@ int CLuaInstance::SignalBoxNew(lua_State *L)
|
||||
int CLuaInstance::SignalBoxPaint(lua_State *L)
|
||||
{
|
||||
lua_assert(lua_istable(L,1));
|
||||
int do_save_bg = 1;
|
||||
tableLookup(L, "do_save_bg", do_save_bg);
|
||||
std::string tmp = "true";
|
||||
tableLookup(L, "do_save_bg", tmp);
|
||||
bool do_save_bg = (tmp == "true" || tmp == "1" || tmp == "yes");
|
||||
|
||||
CLuaSignalBox *m = SignalBoxCheck(L, 1);
|
||||
if (!m)
|
||||
return 0;
|
||||
|
||||
m->s->paint((do_save_bg!=0)?true:false);
|
||||
m->s->paint(do_save_bg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user