From f9c7760f54c279327a977b0cb5ee028c8f0c0bfb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 1 Dec 2016 20:51:42 +0300 Subject: more fixes --- plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp | 11 ++++++----- plugins/MirLua/Modules/m_msg_buttonsbar/src/stdafx.h | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'plugins/MirLua') diff --git a/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp b/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp index 81da1b92a9..2fcbfe320a 100644 --- a/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp +++ b/plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp @@ -1,9 +1,10 @@ #include "stdafx.h" +int hLangpack = 0; + static BBButton* MakeBBButton(lua_State *L) { BBButton *bbb = (BBButton*)mir_calloc(sizeof(BBButton)); - bbb->cbSize = sizeof(BBButton); bbb->dwDefPos = 100; lua_getfield(L, -1, "Module"); @@ -39,7 +40,7 @@ static int lua_AddButton(lua_State *L) BBButton* bbb = MakeBBButton(L); - INT_PTR res = CallService(MS_BB_ADDBUTTON, 0, (LPARAM)bbb); + INT_PTR res = Srmm_AddButton(bbb); lua_pushinteger(L, res); return 1; @@ -55,7 +56,7 @@ static int lua_ModifyButton(lua_State *L) BBButton* bbb = MakeBBButton(L); - INT_PTR res = CallService(MS_BB_MODIFYBUTTON, 0, (LPARAM)bbb); + INT_PTR res = Srmm_ModifyButton(bbb); lua_pushinteger(L, res); mir_free(bbb->pszModuleName); @@ -69,11 +70,11 @@ static int lua_RemoveButton(lua_State *L) { ptrA szModuleName(mir_utf8decodeA(luaL_checkstring(L, 1))); - BBButton mbb = { sizeof(BBButton) }; + BBButton mbb = {}; mbb.pszModuleName = szModuleName; mbb.dwButtonID = luaL_checkinteger(L, 2); - INT_PTR res = ::CallService(MS_BB_REMOVEBUTTON, 0, (LPARAM)&mbb); + INT_PTR res = ::Srmm_RemoveButton(&mbb); lua_pushinteger(L, res); return 1; diff --git a/plugins/MirLua/Modules/m_msg_buttonsbar/src/stdafx.h b/plugins/MirLua/Modules/m_msg_buttonsbar/src/stdafx.h index 89ca58c4fd..50b75904b4 100644 --- a/plugins/MirLua/Modules/m_msg_buttonsbar/src/stdafx.h +++ b/plugins/MirLua/Modules/m_msg_buttonsbar/src/stdafx.h @@ -7,6 +7,7 @@ #include #include +#include #include #endif //_COMMON_H_ \ No newline at end of file -- cgit v1.2.3