diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-01-16 19:48:35 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-01-16 19:48:35 +0000 |
commit | efa07c67497a060009ebb5ec001dbd89684a4e17 (patch) | |
tree | 5c1e036a1596335467cd1c8e70e7cc221dcd1452 /plugins/MirLua/src/m_genmenu.cpp | |
parent | 82ae5fccc82f399b9a6ca52d0dc519f849eff9e4 (diff) |
MirLua: added Add*MenuRoot in m_clist
git-svn-id: http://svn.miranda-ng.org/main/trunk@16105 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_genmenu.cpp')
-rw-r--r-- | plugins/MirLua/src/m_genmenu.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index 7d25468980..b0fbd794a7 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -38,7 +38,7 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi) lua_pop(L, 1);
}
-static int genmenu_CreateRoot(lua_State *L)
+/*static int genmenu_CreateRoot(lua_State *L)
{
ObsoleteMethod(L, "use m_clist module instead");
@@ -72,15 +72,15 @@ static int genmenu_AddMenuItem(lua_State *L) lua_pushlightuserdata(L, res);
return 1;
-}
+}*/
static int genmenu_ModifyMenuItem(lua_State *L)
{
luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
ptrT name(mir_utf8decodeT(lua_tostring(L, 2)));
- HANDLE hIcolibItem = lua_touserdata(L, 3);
- int flags = lua_tointeger(L, 4);
+ HANDLE hIcolibItem = luaL_opt(L, lua_touserdata, 3, INVALID_HANDLE_VALUE);
+ int flags = luaL_optinteger(L, 4, -1);
if (!(flags & CMIF_UNICODE))
flags |= CMIF_UNICODE;
@@ -136,8 +136,8 @@ static int genmenu_RemoveMenuItem(lua_State *L) static luaL_Reg genmenuApi[] =
{
- { "CreateRoot", genmenu_CreateRoot },
- { "AddMenuItem", genmenu_AddMenuItem },
+ //{ "CreateRoot", genmenu_CreateRoot },
+ //{ "AddMenuItem", genmenu_AddMenuItem },
{ "ModifyMenuItem", genmenu_ModifyMenuItem },
{ "ShowMenuItem", genmenu_ShowMenuItem },
{ "EnableMenuItem", genmenu_EnableMenuItem },
|