diff options
Diffstat (limited to 'plugins/MirLua')
-rw-r--r-- | plugins/MirLua/Modules/m_msg_buttonsbar/src/main.cpp | 11 | ||||
-rw-r--r-- | plugins/MirLua/Modules/m_msg_buttonsbar/src/stdafx.h | 1 |
2 files changed, 7 insertions, 5 deletions
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 <m_core.h>
#include <m_utils.h>
+#include <m_message.h>
#include <m_msg_buttonsbar.h>
#endif //_COMMON_H_
\ No newline at end of file |