summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-12-03 19:43:16 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-12-03 19:43:16 +0000
commit294826733381a5123401b656c315f5626bdfbed0 (patch)
treeb12e926e3e402d5c757b7b03dd57906334a4a971 /plugins/MirLua/src
parentf61c97a0fd06af826eedcb1935afc4cd0d9f54dd (diff)
MirLua: fix menu uid loading
git-svn-id: http://svn.miranda-ng.org/main/trunk@15819 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index 619925891e..64ff383ac6 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -15,7 +15,7 @@ void MakeMenuItem(lua_State *L, CMenuItem &mi)
lua_pushliteral(L, "Uid");
lua_gettable(L, -2);
const char* uuid = (char*)lua_tostring(L, -1);
- if (uuid == NULL || CLSIDFromString((LPCOLESTR)ptrT(mir_utf8decodeT(uuid)), (LPCLSID)&mi.uid) != NOERROR)
+ if (UuidFromStringA((RPC_CSTR)uuid, (UUID*)&mi.uid))
UNSET_UID(mi);
lua_pop(L, 1);
@@ -142,12 +142,19 @@ static luaL_Reg genmenuApi[] =
{ "CheckMenuItem", lua_CheckMenuItem },
{ "RemoveMenuItem", lua_RemoveMenuItem },
+ { "MO_MAIN", NULL },
+ { "MO_CONTACT", NULL },
+
{ NULL, NULL }
};
LUAMOD_API int luaopen_m_genmenu(lua_State *L)
{
luaL_newlib(L, genmenuApi);
+ lua_pushinteger(L, MO_MAIN);
+ lua_setfield(L, -2, "MO_MAIN");
+ lua_pushinteger(L, MO_CONTACT);
+ lua_setfield(L, -2, "MO_CONTACT");
return 1;
}