From a5e4d2be50ad50f639b7aabc6de7c115c435830e Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 2 Jan 2016 23:03:00 +0000 Subject: MirLua: - fixed m_schedule - massive function replace git-svn-id: http://svn.miranda-ng.org/main/trunk@16004 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/m_msg_buttonsbar.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'plugins/MirLua/src/m_msg_buttonsbar.cpp') diff --git a/plugins/MirLua/src/m_msg_buttonsbar.cpp b/plugins/MirLua/src/m_msg_buttonsbar.cpp index 103b0d6624..39fff188a1 100644 --- a/plugins/MirLua/src/m_msg_buttonsbar.cpp +++ b/plugins/MirLua/src/m_msg_buttonsbar.cpp @@ -28,31 +28,26 @@ static BBButton* MakeBBButton(lua_State *L) bbb->cbSize = sizeof(BBButton); bbb->dwDefPos = 100; - lua_pushliteral(L, "Module"); - lua_gettable(L, -2); + lua_getfield(L, -1, "Module"); bbb->pszModuleName = mir_utf8decodeA(luaL_checkstring(L, -1)); lua_pop(L, 1); - lua_pushliteral(L, "ButtonID"); - lua_gettable(L, -2); + lua_getfield(L, -1, "ButtonID"); bbb->dwButtonID = luaL_checkinteger(L, -1); lua_pop(L, 1); - lua_pushliteral(L, "Flags"); - lua_gettable(L, -2); + lua_getfield(L, -1, "Flags"); bbb->bbbFlags = lua_tointeger(L, -1); lua_pop(L, 1); if ((bbb->bbbFlags & BBBF_ANSITOOLTIP)) bbb->bbbFlags &= ~BBBF_ANSITOOLTIP; - lua_pushliteral(L, "Tooltip"); - lua_gettable(L, -2); + lua_getfield(L, -1, "Tooltip"); bbb->ptszTooltip = mir_utf8decodeT(lua_tostring(L, -1)); lua_pop(L, 1); - lua_pushliteral(L, "Icon"); - lua_gettable(L, -2); + lua_getfield(L, -1, "Icon"); bbb->hIcon = (HANDLE)lua_touserdata(L, -1); lua_pop(L, 1); -- cgit v1.2.3