diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-05-23 15:16:44 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-05-23 15:16:44 +0000 |
commit | 3a133ffbeb0e68522a75a6988ba9bae717f10f30 (patch) | |
tree | 69effa4255e4af31cb6157ddf51f0fd826df97da /plugins/MirLua | |
parent | 286f6d8ed325ca5f726e6ba5fad86fb834d51c16 (diff) |
MirLua: added ConfigureMenuItem into m_genmenu
git-svn-id: http://svn.miranda-ng.org/main/trunk@16866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua')
-rw-r--r-- | plugins/MirLua/src/m_genmenu.cpp | 15 | ||||
-rw-r--r-- | plugins/MirLua/src/m_message.cpp | 6 |
2 files changed, 18 insertions, 3 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index 21e1533f2a..543fefe022 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -90,6 +90,20 @@ static int genmenu_ModifyMenuItem(lua_State *L) return 1;
}
+static int genmenu_ConfigureMenuItem(lua_State *L)
+{
+ luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+ HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
+ int option = luaL_checkinteger(L, 2);
+ luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
+ INT_PTR value = (INT_PTR)lua_touserdata(L, 3);
+
+ int res = Menu_ConfigureItem(hMenuItem, option, value);
+ lua_pushinteger(L, res);
+
+ return 1;
+}
+
static int genmenu_ShowMenuItem(lua_State *L)
{
luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
@@ -139,6 +153,7 @@ static luaL_Reg genmenuApi[] = //{ "CreateRoot", genmenu_CreateRoot },
//{ "AddMenuItem", genmenu_AddMenuItem },
{ "ModifyMenuItem", genmenu_ModifyMenuItem },
+ { "ConfigureMenuItem", genmenu_ConfigureMenuItem },
{ "ShowMenuItem", genmenu_ShowMenuItem },
{ "EnableMenuItem", genmenu_EnableMenuItem },
{ "CheckMenuItem", genmenu_CheckMenuItem },
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp index 63f86441ff..6a84276afe 100644 --- a/plugins/MirLua/src/m_message.cpp +++ b/plugins/MirLua/src/m_message.cpp @@ -11,7 +11,7 @@ static int message_Paste(lua_State *L) MessageWindowData mwd = { sizeof(MessageWindowData) };
- INT_PTR res = ::CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&mwid, (LPARAM)&mwd);
+ INT_PTR res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&mwid, (LPARAM)&mwd);
lua_pushinteger(L, res);
if (res)
return 1;
@@ -42,7 +42,7 @@ static int message_Send(lua_State *L) gce.ptszText = mir_utf8decodeT(message);
gce.time = time(NULL);
- res = ::CallServiceSync(MS_GC_EVENT, WINDOW_VISIBLE, (LPARAM)&gce);
+ res = CallServiceSync(MS_GC_EVENT, WINDOW_VISIBLE, (LPARAM)&gce);
lua_pushinteger(L, res);
mir_free((void*)gce.ptszText);
@@ -57,7 +57,7 @@ static int message_Send(lua_State *L) dbei.cbBlob = mir_strlen(message);
dbei.pBlob = (PBYTE)mir_strdup(message);
dbei.flags = DBEF_UTF | DBEF_SENT;
- ::db_event_add(hContact, &dbei);
+ db_event_add(hContact, &dbei);
lua_pushinteger(L, res);
return 1;
|