From cfd355e6c8035086c416c161a884242c1bb1800a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 22 May 2018 20:18:38 +0300 Subject: no more need in hLangpack variable *YAHOO* --- plugins/MirLua/Modules/m_toptoolbar/src/main.cpp | 5 +---- plugins/MirLua/src/Modules/m_core.cpp | 2 +- plugins/MirLua/src/main.cpp | 1 - 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'plugins/MirLua') 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; -- cgit v1.2.3