summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_genmenu.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-05-23 15:16:44 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-05-23 15:16:44 +0000
commit3a133ffbeb0e68522a75a6988ba9bae717f10f30 (patch)
tree69effa4255e4af31cb6157ddf51f0fd826df97da /plugins/MirLua/src/m_genmenu.cpp
parent286f6d8ed325ca5f726e6ba5fad86fb834d51c16 (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/src/m_genmenu.cpp')
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp15
1 files changed, 15 insertions, 0 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 },