mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
lua: msgbox fix
This commit is contained in:
@@ -1240,7 +1240,7 @@ int CLuaInstance::MessageboxExec(lua_State *L)
|
|||||||
{ "ok", CMessageBox::mbrOk },
|
{ "ok", CMessageBox::mbrOk },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
if (tableLookup(L, "default", tmp))
|
if (tableLookup(L, "default", tmp)) {
|
||||||
lua_pushvalue(L, -2);
|
lua_pushvalue(L, -2);
|
||||||
const char *val = lua_tostring(L, -2);
|
const char *val = lua_tostring(L, -2);
|
||||||
for (int i = 0; mbr[i].name; i++)
|
for (int i = 0; mbr[i].name; i++)
|
||||||
@@ -1248,6 +1248,7 @@ int CLuaInstance::MessageboxExec(lua_State *L)
|
|||||||
default_button = mbr[i].code;
|
default_button = mbr[i].code;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int res = ShowMsgUTF(name.c_str(), text.c_str(), (CMessageBox::result_) default_button, (CMessageBox::buttons_) show_buttons, icon.empty() ? NULL : icon.c_str(), width, timeout, return_default_on_timeout);
|
int res = ShowMsgUTF(name.c_str(), text.c_str(), (CMessageBox::result_) default_button, (CMessageBox::buttons_) show_buttons, icon.empty() ? NULL : icon.c_str(), width, timeout, return_default_on_timeout);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user