summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_hotkeys.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-12-25 22:14:44 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-12-25 22:14:44 +0000
commit44cebe183fc13d6ced4c2eed155aa03909a542f4 (patch)
tree21ce22a23ea79e0a1269f6082ab91f9525056437 /plugins/MirLua/src/m_hotkeys.cpp
parent64cf90e84966b56fa3da9d01babd0387f23c8086 (diff)
MirLua: minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15942 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/m_hotkeys.cpp')
-rw-r--r--plugins/MirLua/src/m_hotkeys.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp
index e998b04a9a..2c71f28273 100644
--- a/plugins/MirLua/src/m_hotkeys.cpp
+++ b/plugins/MirLua/src/m_hotkeys.cpp
@@ -55,19 +55,18 @@ static int lua_Register(lua_State *L)
MakeHotkey(L, hk);
INT_PTR res = ::CallService("CoreHotkeys/Register", (WPARAM)hScriptsLangpack, (LPARAM)&hk);
- lua_pushinteger(L, res);
+ lua_pushboolean(L, res);
return 1;
}
static int lua_Unregister(lua_State *L)
{
- const char* name = luaL_checkstring(L, 1);
+ const char *name = luaL_checkstring(L, 1);
- INT_PTR res = ::CallService("CoreHotkeys/Unregister", 0, (LPARAM)name);
- lua_pushinteger(L, res);
+ ::CallService("CoreHotkeys/Unregister", 0, (LPARAM)name);
- return 1;
+ return 0;
}
static int lua_MakeHotkey(lua_State *L)
@@ -83,11 +82,10 @@ static int lua_MakeHotkey(lua_State *L)
static luaL_Reg hotkeysApi[] =
{
+ { "MakeHotkey", lua_MakeHotkey },
{ "Register", lua_Register },
{ "Unregister", lua_Unregister },
- { "MakeHotkey", lua_MakeHotkey },
-
{ NULL, NULL }
};