diff options
Diffstat (limited to 'plugins')
-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;
|