summaryrefslogtreecommitdiff
path: root/plugins/MirLua
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-22 20:18:38 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-22 20:18:38 +0300
commitcfd355e6c8035086c416c161a884242c1bb1800a (patch)
tree21af14390a6ae232d67f7b45cd699a4781b901b9 /plugins/MirLua
parentf545bc769a16d1ff7b302733f793cbcbd397cdca (diff)
no more need in hLangpack variable *YAHOO*
Diffstat (limited to 'plugins/MirLua')
-rw-r--r--plugins/MirLua/Modules/m_toptoolbar/src/main.cpp5
-rw-r--r--plugins/MirLua/src/Modules/m_core.cpp2
-rw-r--r--plugins/MirLua/src/main.cpp1
3 files changed, 2 insertions, 6 deletions
diff --git a/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp b/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp
index 621467c431..b575527e70 100644
--- a/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp
+++ b/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp
@@ -1,8 +1,5 @@
#include "stdafx.h"
-int _hLang;
-int &hLangpack(_hLang);
-
static TTBButton* MakeTBButton(lua_State *L)
{
TTBButton *tbb = (TTBButton*)mir_calloc(sizeof(TTBButton));
@@ -67,7 +64,7 @@ static int lua_AddButton(lua_State *L)
TTBButton *tbb = MakeTBButton(L);
- HANDLE res = TopToolbar_AddButton(tbb);
+ HANDLE res = (HANDLE)CallService(MS_TTB_ADDBUTTON, (WPARAM)tbb, 0);
if (res == (HANDLE)-1)
{
lua_pushnil(L);
diff --git a/plugins/MirLua/src/Modules/m_core.cpp b/plugins/MirLua/src/Modules/m_core.cpp
index 747957dbcc..365b89bb43 100644
--- a/plugins/MirLua/src/Modules/m_core.cpp
+++ b/plugins/MirLua/src/Modules/m_core.cpp
@@ -222,7 +222,7 @@ static int core_Translate(lua_State *L)
char *what = (char*)luaL_checkstring(L, 1);
ptrW value(mir_utf8decodeW(what));
- lua_pushstring(L, T2Utf(TranslateW_LP(value, hLangpack)));
+ lua_pushstring(L, T2Utf(TranslateW_LP(value, g_plugin.m_hLang)));
return 1;
}
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp
index c37c75bf9b..244f4c9bc4 100644
--- a/plugins/MirLua/src/main.cpp
+++ b/plugins/MirLua/src/main.cpp
@@ -1,6 +1,5 @@
#include "stdafx.h"
-int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
HANDLE g_hCLibsFolder;