summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/src/main.cpp2
-rw-r--r--plugins/Actman/actman.dpr11
-rw-r--r--plugins/AddContactPlus/src/main.cpp2
-rw-r--r--plugins/Alarms/src/alarms.cpp2
-rw-r--r--plugins/AsSingleWindow/src/AsSingleWindow.cpp2
-rw-r--r--plugins/AssocMgr/src/main.cpp2
-rw-r--r--plugins/AuthState/src/main.cpp2
-rw-r--r--plugins/AutoRun/src/main.cpp2
-rw-r--r--plugins/AutoShutdown/src/main.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarHistory.cpp2
-rw-r--r--plugins/BASS_interface/src/Main.cpp2
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp2
-rw-r--r--plugins/Boltun/src/boltun.cpp2
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp8
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp2
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/ChangeKeyboardLayout/src/main.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp3
-rw-r--r--plugins/Clist_blind/src/init.cpp2
-rw-r--r--plugins/Clist_modern/src/init.cpp2
-rw-r--r--plugins/Clist_nicer/src/init.cpp2
-rw-r--r--plugins/Cln_skinedit/src/main.cpp2
-rw-r--r--plugins/CloudFile/src/main.cpp2
-rw-r--r--plugins/CmdLine/src/CmdLine.cpp2
-rw-r--r--plugins/ConnectionNotify/src/ConnectionNotify.cpp2
-rw-r--r--plugins/Console/src/init.cpp2
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/CountryFlags/src/main.cpp2
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp2
-rw-r--r--plugins/CryptoPP/src/main.cpp2
-rw-r--r--plugins/CyrTranslit/src/main.cpp2
-rw-r--r--plugins/Db3x_mmap/src/init.cpp2
-rw-r--r--plugins/DbEditorPP/src/main.cpp2
-rw-r--r--plugins/Db_autobackups/src/main.cpp5
-rw-r--r--plugins/Dbx_mdbx/src/init.cpp2
-rw-r--r--plugins/Exchange/src/exchange.cpp3
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp2
-rw-r--r--plugins/FavContacts/src/main.cpp2
-rw-r--r--plugins/FileAsMessage/src/main.cpp2
-rw-r--r--plugins/FingerprintNG/src/main.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp2
-rw-r--r--plugins/Folders/src/folders.cpp2
-rw-r--r--plugins/GmailNotifier/src/main.cpp2
-rw-r--r--plugins/HTTPServer/src/main.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp2
-rw-r--r--plugins/HistoryStats/src/main.cpp2
-rw-r--r--plugins/HistorySweeperLight/src/main.cpp2
-rw-r--r--plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp2
-rw-r--r--plugins/HwHotKeys/src/stdafx.h1
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp3
-rw-r--r--plugins/IEHistory/src/stdafx.h1
-rw-r--r--plugins/IEView/src/ieview_main.cpp2
-rw-r--r--plugins/IgnoreState/src/main.cpp2
-rw-r--r--plugins/Import/src/main.cpp2
-rw-r--r--plugins/KeyboardNotify/src/main.cpp2
-rw-r--r--plugins/ListeningTo/src/main.cpp2
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp2
-rw-r--r--plugins/MagneticWindows/src/MagneticWindows.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp2
-rw-r--r--plugins/MessageState/src/main.cpp2
-rw-r--r--plugins/MimCmd/src/MimCmd.cpp3
-rw-r--r--plugins/MirFox/src/MirandaInterface.cpp2
-rw-r--r--plugins/MirLua/Modules/m_toptoolbar/src/main.cpp3
-rw-r--r--plugins/MirLua/src/main.cpp2
-rw-r--r--plugins/MirOTR/src/dllmain.cpp2
-rw-r--r--plugins/MirandaG15/src/Miranda.cpp2
-rw-r--r--plugins/MobileState/src/main.cpp2
-rw-r--r--plugins/MsgPopup/src/main.cpp2
-rwxr-xr-xplugins/Msg_Export/src/main.cpp2
-rw-r--r--plugins/MyDetails/src/mydetails.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp2
-rw-r--r--plugins/NewEventNotify/src/main.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp2
-rwxr-xr-xplugins/New_GPG/src/init.cpp2
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp2
-rw-r--r--plugins/NoHistory/src/dllmain.cpp2
-rw-r--r--plugins/Non-IM Contact/src/main.cpp2
-rw-r--r--plugins/NotesAndReminders/src/main.cpp2
-rw-r--r--plugins/NotifyAnything/src/main.cpp2
-rw-r--r--plugins/Nudge/src/main.cpp2
-rw-r--r--plugins/OpenFolder/src/openFolder.cpp2
-rw-r--r--plugins/OpenSSL/src/main.cpp2
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp2
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp2
-rw-r--r--plugins/Ping/src/ping.cpp2
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp2
-rw-r--r--plugins/Popup/src/main.cpp2
-rw-r--r--plugins/ProfileManager/src/pmanagerEx.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp2
-rw-r--r--plugins/QuickMessages/src/main.cpp2
-rw-r--r--plugins/QuickReplies/src/quickreplies.cpp2
-rw-r--r--plugins/Quotes/src/Forex.cpp2
-rw-r--r--plugins/Rate/src/main.cpp2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp2
-rw-r--r--plugins/Restart/src/restart.cpp2
-rw-r--r--plugins/SMS/src/main.cpp2
-rw-r--r--plugins/Scriver/src/srmm.cpp2
-rw-r--r--plugins/SecureIM/src/main.cpp2
-rw-r--r--plugins/SeenPlugin/src/main.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp2
-rw-r--r--plugins/ShellExt/src/main.cpp2
-rw-r--r--plugins/SimpleAR/src/Main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp2
-rw-r--r--plugins/SkypeStatusChange/src/main.cpp2
-rw-r--r--plugins/SmileyAdd/src/main.cpp2
-rw-r--r--plugins/Spamotron/src/spamotron.cpp2
-rw-r--r--plugins/SpellChecker/src/spellchecker.cpp2
-rw-r--r--plugins/SplashScreen/src/main.cpp2
-rw-r--r--plugins/StartPosition/src/main.cpp2
-rw-r--r--plugins/StartupSilence/src/main.cpp2
-rw-r--r--plugins/StatusChange/src/main.cpp2
-rw-r--r--plugins/StatusManager/src/main.cpp2
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp2
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp2
-rw-r--r--plugins/TabSRMM/src/srmm.cpp2
-rw-r--r--plugins/TipperYM/src/tipper.cpp2
-rw-r--r--plugins/Toaster/src/main.cpp2
-rw-r--r--plugins/TooltipNotify/src/main.cpp2
-rw-r--r--plugins/TopToolBar/src/main.cpp2
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp2
-rw-r--r--plugins/TranslitSwitcher/src/TranslitSwitcher.cpp4
-rw-r--r--plugins/UserGuide/src/main.cpp2
-rw-r--r--plugins/UserInfoEx/src/init.cpp2
-rw-r--r--plugins/Variables/src/main.cpp2
-rw-r--r--plugins/Variables/src/stdafx.h1
-rwxr-xr-xplugins/Watrack_MPD/src/init.cpp2
-rw-r--r--plugins/Weather/src/weather.cpp2
-rw-r--r--plugins/WebView/src/main.cpp2
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp2
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp2
-rw-r--r--plugins/WinterSpeak/src/main.cpp2
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp2
-rw-r--r--plugins/YAMN/src/main.cpp2
-rw-r--r--plugins/YAPP/src/yapp.cpp2
-rw-r--r--plugins/YARelay/src/main.cpp2
-rw-r--r--plugins/ZeroNotification/src/main.cpp2
-rw-r--r--plugins/ZeroSwitch/src/ZeroSwitch.cpp2
-rw-r--r--plugins/mTextControl/src/main.cpp2
-rw-r--r--plugins/wbOSD/src/main.cpp2
142 files changed, 153 insertions, 153 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index c1d80cb239..076f7889c9 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -28,7 +28,7 @@ HICON g_hIcon = nullptr;
bool g_shutDown = false;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
wchar_t g_szDataPath[MAX_PATH]; // user datae path (read at startup only)
BOOL g_AvatarHistoryAvail = FALSE;
diff --git a/plugins/Actman/actman.dpr b/plugins/Actman/actman.dpr
index b4dc351455..0bf4f38921 100644
--- a/plugins/Actman/actman.dpr
+++ b/plugins/Actman/actman.dpr
@@ -136,18 +136,13 @@ begin
begin
if p^.Hash=0 then
p^.Hash:=Hash(p^.Name,StrLen(p^.Name));
- //!! must add icon registration in icolib
-{
- StrCopy(pc,p^.Name);
- ii.szDescr :=p^.Name;
- ii.DefIconID:=;
- Icon_Register(hInstance,'Actions',@ii,1);
-}
+
sid.hDefaultIcon :=LoadImageA(hInstance,p^.Icon,IMAGE_ICON,16,16,0);
sid.szDescription.a:=p^.Name;
StrCopy(pc,p^.Name);
Skin_AddIcon(@sid);
- DestroyIcon(sid.hDefaultIcon);
+
+ DestroyIcon(sid.hDefaultIcon);
p:=p^.Next;
end;
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index 98e2538eb3..fd83d2fd7c 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
static HANDLE hToolBarItem = nullptr;
static HGENMENU hMainMenuItem = nullptr;
HWND hAddDlg;
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp
index b2e01d91e1..76d0a069b5 100644
--- a/plugins/Alarms/src/alarms.cpp
+++ b/plugins/Alarms/src/alarms.cpp
@@ -19,7 +19,7 @@ wchar_t szGamePrefix[] = COMMANDPREFIX;
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hTopToolbarButton;
diff --git a/plugins/AsSingleWindow/src/AsSingleWindow.cpp b/plugins/AsSingleWindow/src/AsSingleWindow.cpp
index d80548ba22..8ab98c8d1a 100644
--- a/plugins/AsSingleWindow/src/AsSingleWindow.cpp
+++ b/plugins/AsSingleWindow/src/AsSingleWindow.cpp
@@ -6,7 +6,7 @@
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/plugins/AssocMgr/src/main.cpp b/plugins/AssocMgr/src/main.cpp
index a498535497..a998291349 100644
--- a/plugins/AssocMgr/src/main.cpp
+++ b/plugins/AssocMgr/src/main.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static HANDLE hHookModulesLoaded;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index 4b5616fe45..abfdbbfb3f 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -22,7 +22,7 @@
static HGENMENU hUserMenu;
HANDLE hExtraIcon;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
Opts Options;
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp
index 5b7f5b37e6..0ecc048e29 100644
--- a/plugins/AutoRun/src/main.cpp
+++ b/plugins/AutoRun/src/main.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HKEY ROOT_KEY = HKEY_CURRENT_USER;
PLUGININFOEX pluginInfoEx = {
diff --git a/plugins/AutoShutdown/src/main.cpp b/plugins/AutoShutdown/src/main.cpp
index d25e969f60..77668f5284 100644
--- a/plugins/AutoShutdown/src/main.cpp
+++ b/plugins/AutoShutdown/src/main.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp
index 46affc4d63..789e210640 100644
--- a/plugins/AvatarHistory/src/AvatarHistory.cpp
+++ b/plugins/AvatarHistory/src/AvatarHistory.cpp
@@ -30,7 +30,7 @@ HANDLE hFolder = nullptr;
wchar_t profilePath[MAX_PATH]; // database profile path (read at startup only)
wchar_t basedir[MAX_PATH];
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
MWindowList hAvatarWindowsList = nullptr;
int OptInit(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index f2d0e60a1f..87641b5d50 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -31,7 +31,7 @@ FARPROC WINAPI delayHook(unsigned dliNotify, PDelayLoadInfo dli)
extern "C" PfnDliHook __pfnDliNotifyHook2 = delayHook;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
PLUGININFOEX pluginInfo = {
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 3504919eac..e9fb0ff265 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -48,7 +48,7 @@ PLUGININFOEX pluginInfo = {
};
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index 00188261de..6f7564d1e3 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -21,7 +21,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
TalkBot* bot = nullptr;
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index dcf4da6bd6..5e6642d5a6 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -19,7 +19,6 @@
#include "stdafx.h"
-CLIST_INTERFACE *pcli;
HGENMENU g_hMenuItem;
HWINEVENTHOOK g_hWinHook;
HWND g_hListenWindow, g_hDlgPass, hOldForegroundWindow;
@@ -30,13 +29,16 @@ WORD g_wMask, g_wMaskAdv;
bool g_bWindowHidden, g_fPassRequested, g_TrayIcon;
char g_password[MAXPASSLEN + 1];
HKL oldLangID, oldLayout;
-CMPlugin g_plugin;
-int protoCount, hLangpack;
+int protoCount;
PROTOACCOUNT **proto;
unsigned *oldStatus;
wchar_t **oldStatusMsg;
BYTE g_bOldSetting;
+CMPlugin g_plugin;
+int &hLangpack(g_plugin.m_hLang);
+CLIST_INTERFACE *pcli;
+
PFNDwmIsCompositionEnabled dwmIsCompositionEnabled;
static void LanguageChanged(HWND hDlg);
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index 17ec545ef8..81149fcc64 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -23,7 +23,7 @@
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
DWORD timer_id = 0;
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index daa4c73022..d7365f0f5a 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
MWindowList hWindowList;
PLUGININFOEX pluginInfo = {
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index e224226ad1..1b72774fe9 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
static LIST<CSWindow> arWindows(3, HandleKeySortT);
diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp
index 9d53aed4b1..8a2e6a0cbd 100644
--- a/plugins/ChangeKeyboardLayout/src/main.cpp
+++ b/plugins/ChangeKeyboardLayout/src/main.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
LPTSTR ptszLayStrings[20];
HANDLE hChangeLayout, hGetLayoutOfText, hChangeTextLayout;
HICON hPopupIcon, hCopyIcon;
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index df8509c519..bd7044e69b 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -21,8 +21,9 @@
HANDLE g_hMainThread;
HGENMENU g_hTogglePopupsMenuItem;
+
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
COptPage *g_PreviewOptPage; // we need to show popup even for the NULL contact if g_PreviewOptPage is not NULL (used for popup preview)
BOOL bPopupExists = FALSE, bFingerprintExists = FALSE, bVariablesExists = FALSE;
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index 811c6abbec..02a59200c4 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli = nullptr, coreCli;
HIMAGELIST himlCListClc = nullptr;
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index cf025c5bf4..45a2b51208 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -37,7 +37,7 @@ HINSTANCE g_hMirApp = nullptr;
CLIST_INTERFACE *pcli = nullptr;
CLIST_INTERFACE corecli = { 0 };
CLUIDATA g_CluiData = {};
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
static HRESULT SubclassClistInterface();
static HRESULT CreateHookableEvents();
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp
index 1ac634c74b..ac80989315 100644
--- a/plugins/Clist_nicer/src/init.cpp
+++ b/plugins/Clist_nicer/src/init.cpp
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CMPlugin g_plugin;
CLIST_INTERFACE *pcli, coreCli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
#define DEFAULT_TB_VISIBILITY (1 | 2 | 4 | 8 | 16 | 32 | 64 | 8192)
diff --git a/plugins/Cln_skinedit/src/main.cpp b/plugins/Cln_skinedit/src/main.cpp
index ed135b36fa..afdd65f2a9 100644
--- a/plugins/Cln_skinedit/src/main.cpp
+++ b/plugins/Cln_skinedit/src/main.cpp
@@ -40,7 +40,7 @@ PLUGININFOEX pluginInfo = {
};
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
StatusItems_t **StatusItems;
ChangedSItems_t ChangedSItems = { 0 };
diff --git a/plugins/CloudFile/src/main.cpp b/plugins/CloudFile/src/main.cpp
index a382ed5ddb..c3c6cb7be9 100644
--- a/plugins/CloudFile/src/main.cpp
+++ b/plugins/CloudFile/src/main.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo =
{
diff --git a/plugins/CmdLine/src/CmdLine.cpp b/plugins/CmdLine/src/CmdLine.cpp
index 745c9fb389..55ee6fe732 100644
--- a/plugins/CmdLine/src/CmdLine.cpp
+++ b/plugins/CmdLine/src/CmdLine.cpp
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
PLUGININFOEX pluginInfo = {
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
index 46b95320dc..69892a4ef4 100644
--- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp
+++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp
@@ -16,7 +16,7 @@ HANDLE hFilterOptionsThread = nullptr;
HANDLE killCheckThreadEvent = nullptr;
HANDLE hExceptionsMutex = nullptr;
//HANDLE hCurrentEditMutex=NULL;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
DWORD FilterOptionsThreadId;
DWORD ConnectionCheckThreadId;
diff --git a/plugins/Console/src/init.cpp b/plugins/Console/src/init.cpp
index f0f6d004d0..063b72992f 100644
--- a/plugins/Console/src/init.cpp
+++ b/plugins/Console/src/init.cpp
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
DWORD mirandaVer;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index 157cfb460d..872f18d593 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -26,7 +26,7 @@
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
int g_Utf8EventsSupported = TRUE;
diff --git a/plugins/CountryFlags/src/main.cpp b/plugins/CountryFlags/src/main.cpp
index 78525158be..2310b6d811 100644
--- a/plugins/CountryFlags/src/main.cpp
+++ b/plugins/CountryFlags/src/main.cpp
@@ -23,7 +23,7 @@ int nCountriesCount;
CountryListEntry *countries;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
static PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index ae4450d937..bddadf4f8c 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
DWORD mirandaVersion;
LCID packlcid;
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp
index de8b9a178d..52d452b873 100644
--- a/plugins/CryptoPP/src/main.cpp
+++ b/plugins/CryptoPP/src/main.cpp
@@ -1,7 +1,7 @@
#include "commonheaders.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
LPCSTR szModuleName = MODULENAME;
LPCSTR szVersionStr = MODULENAME" DLL (" __VERSION_STRING_DOTS ")";
diff --git a/plugins/CyrTranslit/src/main.cpp b/plugins/CyrTranslit/src/main.cpp
index 13cb87d0a3..6822b00b0b 100644
--- a/plugins/CyrTranslit/src/main.cpp
+++ b/plugins/CyrTranslit/src/main.cpp
@@ -20,7 +20,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfoEx={
sizeof(PLUGININFOEX),
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp
index 6084f09ffa..b7a2652868 100644
--- a/plugins/Db3x_mmap/src/init.cpp
+++ b/plugins/Db3x_mmap/src/init.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
LIST<CDb3Mmap> g_Dbs(1, HandleKeySortT);
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 70a77edb7b..a91fa47d94 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -7,7 +7,7 @@ bool g_bServiceMode = false;
bool g_bUsePopups;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
BYTE nameOrder[NAMEORDERCOUNT];
HGENMENU hUserMenu;
MCONTACT hRestore;
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index ceb612aac9..4131c547a0 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -1,8 +1,9 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
-HANDLE hFolder;
+int &hLangpack(g_plugin.m_hLang);
+
+HANDLE hFolder;
char g_szMirVer[100];
PLUGININFOEX pluginInfo = {
diff --git a/plugins/Dbx_mdbx/src/init.cpp b/plugins/Dbx_mdbx/src/init.cpp
index bedddf12fa..a2c3243cd8 100644
--- a/plugins/Dbx_mdbx/src/init.cpp
+++ b/plugins/Dbx_mdbx/src/init.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
EXTERN_C void NTAPI tls_callback(PVOID module, DWORD reason, PVOID reserved);
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID reserved)
diff --git a/plugins/Exchange/src/exchange.cpp b/plugins/Exchange/src/exchange.cpp
index 2c80074eda..56596f5577 100644
--- a/plugins/Exchange/src/exchange.cpp
+++ b/plugins/Exchange/src/exchange.cpp
@@ -22,8 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HICON hiMailIcon = nullptr;
HWND hEmailsDlg = nullptr;
-int hLangpack=0;
+
CMPlugin g_plugin;
+int &hLangpack(g_plugin.m_hLang);
CExchangeServer exchangeServer;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index d60f6e76a4..fddf343b26 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HGENMENU hMenu, hMainMenu, hSubMenu[ServerList::FTP_COUNT], hMainSubMenu[ServerList::FTP_COUNT];
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index 6c023ea33a..2ec9db00a2 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "http_api.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index 3e96b927fa..7db2f16fda 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -17,7 +17,7 @@ PLUGININFOEX pluginInfo =
CLIST_INTERFACE *pcli;
MWindowList hFileList;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
char *szServiceTitle = SERVICE_TITLE;
char *szServicePrefix = SERVICE_PREFIX;
diff --git a/plugins/FingerprintNG/src/main.cpp b/plugins/FingerprintNG/src/main.cpp
index 9859de14ca..6737b218bf 100644
--- a/plugins/FingerprintNG/src/main.cpp
+++ b/plugins/FingerprintNG/src/main.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define LIB_USE 3
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hHeap = nullptr;
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index 28d6b872b3..a230d42dbf 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -63,7 +63,7 @@ BOOL bIsCListShow;
HGENMENU hMenuItemRemove, hMenuItemHideAll, hMainMenuItemHideAll;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
//Options
diff --git a/plugins/Folders/src/folders.cpp b/plugins/Folders/src/folders.cpp
index 20f9f17050..85061f5f38 100644
--- a/plugins/Folders/src/folders.cpp
+++ b/plugins/Folders/src/folders.cpp
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
OBJLIST<CFolderItem> lstRegisteredFolders(10, PtrKeySortT);
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp
index c38139c9b8..e36b288309 100644
--- a/plugins/GmailNotifier/src/main.cpp
+++ b/plugins/GmailNotifier/src/main.cpp
@@ -11,7 +11,7 @@ There is no warranty.
#include "version.h"
CLIST_INTERFACE *pcli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
UINT hTimer;
HANDLE hMirandaStarted, hOptionsInitial;
HNETLIBUSER hNetlibUser;
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index d66eb04dc9..9b695fed2b 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -83,7 +83,7 @@ bool bLimitOnlyWhenOnline = true;
bool bShutdownInProgress = false;
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
extern HWND hwndStatsticView;
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index b022b48871..4fef7f20b9 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -20,7 +20,7 @@
MWindowList hWindowList;
HCURSOR splitCursor;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 1ac0efb40e..44aba9af45 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -12,7 +12,7 @@
#include "dlgconfigure.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
static const int g_pluginFileListID = 2535;
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp
index 84937354a5..9ddc5c5e84 100644
--- a/plugins/HistorySweeperLight/src/main.cpp
+++ b/plugins/HistorySweeperLight/src/main.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
LIST<void> g_hWindows(5, PtrKeySortT);
diff --git a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp
index 7910ed2219..63d0a172fa 100644
--- a/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp
+++ b/plugins/HwHotKeys/src/HwHotKeys_DllMain.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 - 1307, USA.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HWND hDialogWnd = nullptr; // хэндл окна настроек, он глобально используется для вывода туда в реалтайме сканкодов клавы из хука
HHOOK hHook;
CLIST_INTERFACE *pcli;
diff --git a/plugins/HwHotKeys/src/stdafx.h b/plugins/HwHotKeys/src/stdafx.h
index 192862500f..fdd33abd39 100644
--- a/plugins/HwHotKeys/src/stdafx.h
+++ b/plugins/HwHotKeys/src/stdafx.h
@@ -48,7 +48,6 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{}
};
-extern INT hLangpack;
extern HWND hDialogWnd; // глобально используется для вывода туда в реалтайме сканкодов клавы, из хука
extern HHOOK hHook;
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index 20d4b71a99..4984a5984b 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -22,7 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "services.h"
CMPlugin g_plugin;
-int hLangpack;//Miranda NG langpack used by translate functions, filled by mir_getLP()
+int &hLangpack(g_plugin.m_hLang);
+
HICON hIcon;
HINSTANCE hInstance;
MWindowList hOpenWindowsList = nullptr;
diff --git a/plugins/IEHistory/src/stdafx.h b/plugins/IEHistory/src/stdafx.h
index 55a4f4aa59..484b43b461 100644
--- a/plugins/IEHistory/src/stdafx.h
+++ b/plugins/IEHistory/src/stdafx.h
@@ -80,7 +80,6 @@ struct CMPlugin : public PLUGIN<CMPlugin>
};
extern HICON hIcon; //history icon
-extern int hLangpack;
extern MWindowList hOpenWindowsList;
extern PLUGININFOEX pluginInfo;
diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp
index 544f3a1382..bfb261d087 100644
--- a/plugins/IEView/src/ieview_main.cpp
+++ b/plugins/IEView/src/ieview_main.cpp
@@ -24,7 +24,7 @@ CLIST_INTERFACE *pcli;
char *workingDirUtf8;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp
index bdf90c3e97..64835afef1 100644
--- a/plugins/IgnoreState/src/main.cpp
+++ b/plugins/IgnoreState/src/main.cpp
@@ -25,7 +25,7 @@ HANDLE hHookExtraIconsRebuild = nullptr, hHookExtraIconsApply = nullptr, hContac
HANDLE hPrebuildContactMenu = nullptr;
HANDLE hExtraIcon = nullptr;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
INT currentFilter = 0;
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index c3025c70bb..cd2832123c 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -29,7 +29,7 @@ INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lP
bool g_bServiceMode = false, g_bSendQuit = false;
HWND hwndWizard, hwndAccMerge;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo =
{
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index fe53b08299..5919340b29 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -26,7 +26,7 @@
#define NCONVERS_BLINKID ((MEVENT)123456) //nconvers' random identifier used to flash an icon for "incoming message" on contact list
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
diff --git a/plugins/ListeningTo/src/main.cpp b/plugins/ListeningTo/src/main.cpp
index b44b7bd50a..ab7a132a44 100644
--- a/plugins/ListeningTo/src/main.cpp
+++ b/plugins/ListeningTo/src/main.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 8eefe07da2..542e7eece9 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -22,7 +22,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam);
#define STATUS_COUNT 9
char PLUGINNAME[64] = {0}; //init at init_pluginname();
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/MagneticWindows/src/MagneticWindows.cpp b/plugins/MagneticWindows/src/MagneticWindows.cpp
index c244dd19b5..e1bc6f5eb0 100644
--- a/plugins/MagneticWindows/src/MagneticWindows.cpp
+++ b/plugins/MagneticWindows/src/MagneticWindows.cpp
@@ -31,7 +31,7 @@ PLUGININFOEX pluginInfo = {
};
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 3448666c87..7a65c6b0b7 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -25,7 +25,7 @@ BOOL bPopupService = FALSE;
PROTOACCOUNT **accs;
int protoCount;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
struct {
char *module;
diff --git a/plugins/MessageState/src/main.cpp b/plugins/MessageState/src/main.cpp
index 1eab147bb8..eb82d342cb 100644
--- a/plugins/MessageState/src/main.cpp
+++ b/plugins/MessageState/src/main.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/MimCmd/src/MimCmd.cpp b/plugins/MimCmd/src/MimCmd.cpp
index b077a9d434..39a3dcbe39 100644
--- a/plugins/MimCmd/src/MimCmd.cpp
+++ b/plugins/MimCmd/src/MimCmd.cpp
@@ -22,7 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma comment(lib, "delayimp.lib")
-int hLangpack = 0;
+int _hLang;
+int &hLangpack = _hLang;
wchar_t* GetProgramName(wchar_t *programName, size_t size)
{
diff --git a/plugins/MirFox/src/MirandaInterface.cpp b/plugins/MirFox/src/MirandaInterface.cpp
index e744018012..416ebcaf24 100644
--- a/plugins/MirFox/src/MirandaInterface.cpp
+++ b/plugins/MirFox/src/MirandaInterface.cpp
@@ -6,7 +6,7 @@
CMPlugin g_plugin;
//Miranda - Langpack
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
//Miranda - HANDLE to hooked protocols ACK
HANDLE hProtoAck;
diff --git a/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp b/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp
index 55c4cf04d8..621467c431 100644
--- a/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp
+++ b/plugins/MirLua/Modules/m_toptoolbar/src/main.cpp
@@ -1,6 +1,7 @@
#include "stdafx.h"
-int hLangpack;
+int _hLang;
+int &hLangpack(_hLang);
static TTBButton* MakeTBButton(lua_State *L)
{
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp
index 31c5d93912..6388952bae 100644
--- a/plugins/MirLua/src/main.cpp
+++ b/plugins/MirLua/src/main.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CMLua *g_mLua;
diff --git a/plugins/MirOTR/src/dllmain.cpp b/plugins/MirOTR/src/dllmain.cpp
index 92dadd48a2..1d1284b6de 100644
--- a/plugins/MirOTR/src/dllmain.cpp
+++ b/plugins/MirOTR/src/dllmain.cpp
@@ -1,7 +1,7 @@
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp
index 6b6adb92d8..a153de8021 100644
--- a/plugins/MirandaG15/src/Miranda.cpp
+++ b/plugins/MirandaG15/src/Miranda.cpp
@@ -58,7 +58,7 @@ bool g_bInitialized;
// Plugin Information
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp
index 2ced60c6cb..eb52dbba7f 100644
--- a/plugins/MobileState/src/main.cpp
+++ b/plugins/MobileState/src/main.cpp
@@ -19,7 +19,7 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
HANDLE hExtraIcon = nullptr;
diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp
index f35ce90daa..8fb334466f 100644
--- a/plugins/MsgPopup/src/main.cpp
+++ b/plugins/MsgPopup/src/main.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
MSGBOXOPTIONS optionsDefault =
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index 69dc23a94d..393184075b 100755
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -18,7 +18,7 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
MWindowList hInternalWindowList = nullptr;
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp
index aad7b0c45f..03de0ef53c 100644
--- a/plugins/MyDetails/src/mydetails.cpp
+++ b/plugins/MyDetails/src/mydetails.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index 14e0376802..47b12187c0 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -42,7 +42,7 @@
#include "version.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE g_hTopToolbarbutton;
HGENMENU g_hToggleSOEMenuItem, g_hToggleSOEContactMenuItem, g_hContactMenuItem, g_hReadStatMenuItem;
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp
index 973c77ac37..6f2bfe3b7c 100644
--- a/plugins/NewEventNotify/src/main.cpp
+++ b/plugins/NewEventNotify/src/main.cpp
@@ -33,7 +33,7 @@ PLUGIN_OPTIONS pluginOptions;
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index e960275006..d9f7f14b2c 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -23,7 +23,7 @@
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
LIST<DBEVENT> eventListXStatus(10, PtrKeySortT);
LIST<DBEVENT> eventListStatus(10, PtrKeySortT);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 039c33c3b0..db4f6cc28e 100755
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -17,7 +17,7 @@
#include "stdafx.h"
//global variables
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp
index c4eb978981..24fa21e9b0 100644
--- a/plugins/NewsAggregator/Src/NewsAggregator.cpp
+++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hPrebuildMenuHook = nullptr;
CDlgBase *pAddFeedDialog = nullptr, *pImportDialog = nullptr, *pExportDialog = nullptr;
wchar_t tszRoot[MAX_PATH] = {0};
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 9b03d1d110..3f3e1a8ae5 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
// add icon to srmm status icons
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index d719ae38f8..96c9551b92 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -7,7 +7,7 @@
#include "Version.h"
CLIST_INTERFACE *pcli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
INT_PTR doubleClick(WPARAM wParam, LPARAM)
{
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 9f3cd465fe..e2e859a0a5 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -3,7 +3,7 @@
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
HINSTANCE hmiranda = nullptr;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hkOptInit = nullptr;
HANDLE hkTopToolbarInit = nullptr;
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp
index a08a7d7dce..b7d697feec 100644
--- a/plugins/NotifyAnything/src/main.cpp
+++ b/plugins/NotifyAnything/src/main.cpp
@@ -25,7 +25,7 @@ std::wstring g_mirandaDir;
mir_cs g_wsocklock;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index f7a0c6e189..0428556e54 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -10,7 +10,7 @@ CShake shake;
CNudge GlobalNudge;
CLIST_INTERFACE *pcli;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
static IconItem iconList[] =
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp
index c2898261d1..0695ca0ed1 100644
--- a/plugins/OpenFolder/src/openFolder.cpp
+++ b/plugins/OpenFolder/src/openFolder.cpp
@@ -8,7 +8,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hButtonTopToolbar;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/OpenSSL/src/main.cpp b/plugins/OpenSSL/src/main.cpp
index 36c5691730..1b59fa5b7a 100644
--- a/plugins/OpenSSL/src/main.cpp
+++ b/plugins/OpenSSL/src/main.cpp
@@ -31,7 +31,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index 4a47392e0a..2199c515ab 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA.
HANDLE hPackUpdaterFolder = nullptr;
wchar_t tszRoot[MAX_PATH] = { 0 };
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 9cd94f3c4e..d6d968a30f 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -32,7 +32,7 @@ HANDLE hWindowEvent = nullptr;
static IconItem icon = { LPGEN("Paste It"), "PasteIt_main", IDI_MENU };
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CHAT_MANAGER *pci;
#define FROM_CLIPBOARD 10
diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp
index 1e9a7de001..687068024b 100644
--- a/plugins/Ping/src/ping.cpp
+++ b/plugins/Ping/src/ping.cpp
@@ -2,7 +2,7 @@
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
HNETLIBUSER hNetlibUser = nullptr;
HANDLE hFillListEvent = nullptr;
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index cc4f361e95..49baa4f787 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
wchar_t g_tszRoot[MAX_PATH] = {0}, g_tszTempPath[MAX_PATH];
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index d470ee9d8f..ad6cfe6336 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -36,7 +36,7 @@ void UpgradeDb();
//===== Initializations =================================================================
static int OkToExit(WPARAM, LPARAM);
bool OptionLoaded = false;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp
index 4cfbce533e..ceb58fa1aa 100644
--- a/plugins/ProfileManager/src/pmanagerEx.cpp
+++ b/plugins/ProfileManager/src/pmanagerEx.cpp
@@ -21,7 +21,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 006d1397c2..a367cd4da9 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA.
// Prototypes ///////////////////////////////////////////////////////////////////////////
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
HANDLE hModulesLoaded = nullptr;
diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp
index 8d6060fade..974abd24d0 100644
--- a/plugins/QuickMessages/src/main.cpp
+++ b/plugins/QuickMessages/src/main.cpp
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
WNDPROC mainProc;
diff --git a/plugins/QuickReplies/src/quickreplies.cpp b/plugins/QuickReplies/src/quickreplies.cpp
index a4718893d7..22754bf120 100644
--- a/plugins/QuickReplies/src/quickreplies.cpp
+++ b/plugins/QuickReplies/src/quickreplies.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 181f36d14e..5d791bee55 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -3,7 +3,7 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE g_hEventWorkThreadStop;
//int g_nStatus = ID_STATUS_OFFLINE;
bool g_bAutoUpdate = true;
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp
index 0e6d3a20ca..5cb18e34be 100644
--- a/plugins/Rate/src/main.cpp
+++ b/plugins/Rate/src/main.cpp
@@ -45,7 +45,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
///////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index d65e97e226..ea0d078487 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -7,7 +7,7 @@ using namespace std;
static const basic_string <char>::size_type npos = -1;
char *szProto;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CHAT_MANAGER *pci;
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index 6038030e57..e6c192d0eb 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -36,7 +36,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
char gIniFile[MAX_PATH];
char gMirandaDir[MAX_PATH];
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp
index d274593254..c217e6ff41 100644
--- a/plugins/Restart/src/restart.cpp
+++ b/plugins/Restart/src/restart.cpp
@@ -8,7 +8,7 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hRestartMe;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/SMS/src/main.cpp b/plugins/SMS/src/main.cpp
index 939ed8ecc0..196b53ba3a 100644
--- a/plugins/SMS/src/main.cpp
+++ b/plugins/SMS/src/main.cpp
@@ -27,7 +27,7 @@ Enjoy the code and use it smartly!
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/Scriver/src/srmm.cpp b/plugins/Scriver/src/srmm.cpp
index 26b671eda3..148f419de6 100644
--- a/plugins/Scriver/src/srmm.cpp
+++ b/plugins/Scriver/src/srmm.cpp
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int OnLoadModule(void);
int OnUnloadModule(void);
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index 611081ae2a..b69c0ad649 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -1,7 +1,7 @@
#include "commonheaders.h"
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp
index 314bb9860f..058eec0d1c 100644
--- a/plugins/SeenPlugin/src/main.cpp
+++ b/plugins/SeenPlugin/src/main.cpp
@@ -24,7 +24,7 @@ HANDLE ehmissed = nullptr, ehuserinfo = nullptr, ehmissed_proto = nullptr;
HANDLE g_hShutdownEvent;
MWindowList g_pUserInfo;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 6f34b5c0d8..a69a317809 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Prototypes ///////////////////////////////////////////////////////////////////////////
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CHAT_MANAGER *pci;
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 6894cbf16e..2a0a27d213 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -45,7 +45,7 @@ MCONTACT user_session_list[255] = { 0 };
MCONTACT session_list_recovered[255];
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
int OptionsInit(WPARAM, LPARAM);
diff --git a/plugins/ShellExt/src/main.cpp b/plugins/ShellExt/src/main.cpp
index ec5076eb8f..d928c4e914 100644
--- a/plugins/ShellExt/src/main.cpp
+++ b/plugins/ShellExt/src/main.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
#include "shlcom.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
bool bIsVistaPlus;
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index 2a5c2ffa08..56064ab583 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -16,7 +16,7 @@ Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 1a7dd6631a..26e01b7331 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
PROTOACCOUNTS *accounts;
diff --git a/plugins/SkypeStatusChange/src/main.cpp b/plugins/SkypeStatusChange/src/main.cpp
index 94fd2c560a..8c76ab902c 100644
--- a/plugins/SkypeStatusChange/src/main.cpp
+++ b/plugins/SkypeStatusChange/src/main.cpp
@@ -4,7 +4,7 @@
#pragma comment(lib, "Comctl32.lib")
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
int SSC_OptInitialise(WPARAM wp, LPARAM lp);
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index 0d936dec12..a4322180af 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
HANDLE hEvent1;
HGENMENU hContactMenuItem;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp
index a67fdd2b8c..b6c3936f9f 100644
--- a/plugins/Spamotron/src/spamotron.cpp
+++ b/plugins/Spamotron/src/spamotron.cpp
@@ -3,7 +3,7 @@
HANDLE hOptInitialize, hModulesLoaded, hDBContactAdded, hDBEventAdded, hDBEventFilterAdd;
time_t last_queue_check = 0;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp
index 276c2b650c..27d92f30c1 100644
--- a/plugins/SpellChecker/src/spellchecker.cpp
+++ b/plugins/SpellChecker/src/spellchecker.cpp
@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA.
// Prototypes ///////////////////////////////////////////////////////////////////////////
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
HANDLE hDictionariesFolder = nullptr;
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index ab415fb252..fe3b0fef96 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
BOOL bstartup = true; // startup?
diff --git a/plugins/StartPosition/src/main.cpp b/plugins/StartPosition/src/main.cpp
index 80bbb1d457..5b8e2b3c5c 100644
--- a/plugins/StartPosition/src/main.cpp
+++ b/plugins/StartPosition/src/main.cpp
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index 775968b2f2..60960e472d 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
HGENMENU hSSMenuToggleOnOff;
diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp
index b91526137b..7902464612 100644
--- a/plugins/StatusChange/src/main.cpp
+++ b/plugins/StatusChange/src/main.cpp
@@ -5,7 +5,7 @@ HICON hIconMsg;
HICON hIconUrl;
HICON hIconFile;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/StatusManager/src/main.cpp b/plugins/StatusManager/src/main.cpp
index b44f9ba773..f7d35ec131 100644
--- a/plugins/StatusManager/src/main.cpp
+++ b/plugins/StatusManager/src/main.cpp
@@ -19,7 +19,7 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index 58b8a765b6..99000914c3 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -18,7 +18,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hEventFilter = nullptr, hOptInitialise = nullptr, hSettingChanged = nullptr;
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index 7ea8d973a6..8a64463236 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 1b5fcd24f9..5c09ec31cb 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -35,7 +35,7 @@ LOGFONT lfDefault = { 0 };
*/
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp
index 216b4e2af6..e2835f04f9 100644
--- a/plugins/TipperYM/src/tipper.cpp
+++ b/plugins/TipperYM/src/tipper.cpp
@@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/Toaster/src/main.cpp b/plugins/Toaster/src/main.cpp
index 406bd52180..acf2eae2a6 100644
--- a/plugins/Toaster/src/main.cpp
+++ b/plugins/Toaster/src/main.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp
index 001fa83d7b..2acb0378a4 100644
--- a/plugins/TooltipNotify/src/main.cpp
+++ b/plugins/TooltipNotify/src/main.cpp
@@ -12,7 +12,7 @@ static HANDLE g_hProtoContactIsTyping = nullptr;
// Main global object
static CTooltipNotify *g_pTooltipNotify = nullptr;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
diff --git a/plugins/TopToolBar/src/main.cpp b/plugins/TopToolBar/src/main.cpp
index ee8cdebcdc..896e70ad65 100644
--- a/plugins/TopToolBar/src/main.cpp
+++ b/plugins/TopToolBar/src/main.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index c0ca36dc44..6a81a662d3 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -30,7 +30,7 @@ HWND TrafficHwnd;
CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
-int hLangpack = 0; // Поддержка плагинозависимого перевода.
+int &hLangpack(g_plugin.m_hLang);
BOOL bPopupExists = FALSE, bVariablesExists = FALSE, bTooltipExists = FALSE;
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
index 223bb849e6..defc2903ad 100644
--- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
+++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
@@ -19,8 +19,6 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-int hLangpack;
-
struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin() :
@@ -29,6 +27,8 @@ struct CMPlugin : public PLUGIN<CMPlugin>
}
g_plugin;
+int &hLangpack(g_plugin.m_hLang);
+
/////////////////////////////////////////////////////////////////////////////////////////
PLUGININFOEX pluginInfoEx = {
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp
index c1be1d50db..f537c7e81b 100644
--- a/plugins/UserGuide/src/main.cpp
+++ b/plugins/UserGuide/src/main.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp
index e366ddf91f..d4e3d64307 100644
--- a/plugins/UserInfoEx/src/init.cpp
+++ b/plugins/UserInfoEx/src/init.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
CLIST_INTERFACE *pcli;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HMODULE hDwmApi;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Variables/src/main.cpp b/plugins/Variables/src/main.cpp
index 551871a485..5865d390f8 100644
--- a/plugins/Variables/src/main.cpp
+++ b/plugins/Variables/src/main.cpp
@@ -20,7 +20,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaPluginInfoEx - returns the extended information about a plugin
diff --git a/plugins/Variables/src/stdafx.h b/plugins/Variables/src/stdafx.h
index fa651b6014..8e6de81b06 100644
--- a/plugins/Variables/src/stdafx.h
+++ b/plugins/Variables/src/stdafx.h
@@ -156,7 +156,6 @@ struct ParseOptions {
};
extern ParseOptions gParseOpts;
-extern int hLangpack;
// variables.c
//int isValidTokenChar(char c);
diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp
index b764322a32..7de20e5228 100755
--- a/plugins/Watrack_MPD/src/init.cpp
+++ b/plugins/Watrack_MPD/src/init.cpp
@@ -16,7 +16,7 @@
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
BOOL bWatrackService = FALSE;
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp
index 3920685b73..b3f1b4706e 100644
--- a/plugins/Weather/src/weather.cpp
+++ b/plugins/Weather/src/weather.cpp
@@ -45,7 +45,7 @@ unsigned status;
unsigned old_status;
UINT_PTR timerId;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
MYOPTIONS opt;
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index a5041f21c0..76deec0957 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -27,7 +27,7 @@ MWindowList hWindowList;
HNETLIBUSER hNetlibUser;
HANDLE hHookDisplayDataAlert, hHookAlertPopup, hHookAlertWPopup, hHookErrorPopup, hHookAlertOSD;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
static HMODULE hRichEd = nullptr;
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index 87de917e0e..c9be02faa9 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -25,7 +25,7 @@ HWND hUpcomingDlg = nullptr;
MWindowList hAddBirthdayWndsList = nullptr;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CommonData commonData = { 0 };
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index 9e2398a04c..f9984007e5 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -5,7 +5,7 @@ HGENMENU hMenuItem = nullptr;
HWND hDlg;
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp
index cbe678d4c1..76164aea13 100644
--- a/plugins/WinterSpeak/src/main.cpp
+++ b/plugins/WinterSpeak/src/main.cpp
@@ -1,7 +1,7 @@
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
SpeakConfig *g_speak_config = nullptr;
SpeakAnnounce *g_speak_announce = nullptr;
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index ca3dab258a..e56d6b5d98 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -9,7 +9,7 @@ There is no warranty.
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
CHAT_MANAGER *pci;
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index 41acfb6955..ccfb301fc4 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -30,7 +30,7 @@ static int iDllPlugins = 0;
YAMN_VARIABLES YAMNVar;
CLIST_INTERFACE *pcli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HANDLE hNewMailHook;
HANDLE NoWriterEV;
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index c00ce0989c..feb7f9d743 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -19,7 +19,7 @@ HFONT hFontFirstLine = nullptr, hFontSecondLine = nullptr, hFontTime = nullptr;
COLORREF colFirstLine = RGB(255, 0, 0), colSecondLine = 0, colTime = RGB(0, 0, 255), colBorder = RGB(0, 0, 0),
colSidebar = RGB(128, 128, 128), colTitleUnderline = GetSysColor(COLOR_3DSHADOW);
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
// toptoolbar button
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp
index 4aba06bdb5..c2a8264cd3 100644
--- a/plugins/YARelay/src/main.cpp
+++ b/plugins/YARelay/src/main.cpp
@@ -22,7 +22,7 @@ Features:
#include "../../utils/mir_buffer.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
MCONTACT hForwardFrom, hForwardTo;
wchar_t tszForwardTemplate[MAXTEMPLATESIZE];
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index cb6bafbf0b..d8b19def2b 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -10,7 +10,7 @@ https://miranda-ng.org/
CMPlugin g_plugin;
HGENMENU noSoundMenu;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
int OptionsInitialize(WPARAM, LPARAM);
diff --git a/plugins/ZeroSwitch/src/ZeroSwitch.cpp b/plugins/ZeroSwitch/src/ZeroSwitch.cpp
index 1c26de1e98..6d87f40310 100644
--- a/plugins/ZeroSwitch/src/ZeroSwitch.cpp
+++ b/plugins/ZeroSwitch/src/ZeroSwitch.cpp
@@ -13,7 +13,7 @@ g_plugin;
HHOOK hHook;
HWND hDummyWnd = nullptr, hHelperWnd = nullptr, hMirandaWnd = nullptr;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CLIST_INTERFACE *pcli;
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp
index a710853b9c..1430085f31 100644
--- a/plugins/mTextControl/src/main.cpp
+++ b/plugins/mTextControl/src/main.cpp
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
HMODULE hMsfteditDll = nullptr;
diff --git a/plugins/wbOSD/src/main.cpp b/plugins/wbOSD/src/main.cpp
index 486b5a7511..f24e5edb8c 100644
--- a/plugins/wbOSD/src/main.cpp
+++ b/plugins/wbOSD/src/main.cpp
@@ -9,7 +9,7 @@ Distributed under GNU's GPL 2 or later
#include "stdafx.h"
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
CMPlugin g_plugin;
HWND g_hWnd = nullptr;