summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-07-30 17:30:39 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-07-30 17:30:39 +0300
commit6fad3235de6bec045fec19a7265e19e880ac84e2 (patch)
treeea375f721c2cc7e586142ccd0298b096a7a5b31f /plugins/MirLua/src
parent4aab3b6bc3d66ade09b25649d389b8aef358bfbd (diff)
Hotkeys: code cleaning
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r--plugins/MirLua/src/m_hotkeys.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp
index e3c71cf38c..63358fd31c 100644
--- a/plugins/MirLua/src/m_hotkeys.cpp
+++ b/plugins/MirLua/src/m_hotkeys.cpp
@@ -2,8 +2,6 @@
void MakeHotkey(lua_State *L, HOTKEYDESC &hk)
{
- hk.cbSize = sizeof(HOTKEYDESC);
-
lua_getfield(L, -1, "Flags");
hk.dwFlags = lua_tointeger(L, -1);
lua_pop(L, 1);
@@ -16,11 +14,11 @@ void MakeHotkey(lua_State *L, HOTKEYDESC &hk)
lua_pop(L, 1);
lua_getfield(L, -1, "Description");
- hk.pwszDescription = mir_utf8decodeW(lua_tostring(L, -1));
+ hk.szDescription.w = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "Section");
- hk.pwszSection = mir_utf8decodeW(luaL_optstring(L, -1, MODULE));
+ hk.szSection.w = mir_utf8decodeW(luaL_optstring(L, -1, MODULE));
lua_pop(L, 1);
lua_getfield(L, -1, "Hotkey");
@@ -58,9 +56,7 @@ static int hotkeys_Register(lua_State *L)
static int hotkeys_Unregister(lua_State *L)
{
const char *name = luaL_checkstring(L, 1);
-
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)name);
-
+ Hotkey_Unregister(name);
return 0;
}