diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-18 20:40:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-18 20:40:44 +0300 |
commit | 37a022d37e79dbe9892f376ef7c3b6b8878c4aff (patch) | |
tree | 2700034a1955c16cb5eff5ffb944cc2eb7d9c00f /src | |
parent | 5335298d8eb7571db123afb3bd1340cd949a8208 (diff) |
hLangpack variable began migration inside CMPluginBase
it remains existing for now, but as reference to g_plugin.m_hLang
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdautoaway/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdaway/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdclist/src/init.cpp | 2 | ||||
-rw-r--r-- | src/core/stdcrypt/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdemail/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdidle/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/srmm.cpp | 2 | ||||
-rw-r--r-- | src/core/stdssl/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stduihist/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stduserinfo/src/main.cpp | 2 | ||||
-rw-r--r-- | src/core/stduseronline/src/main.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/CMPluginBase.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/miranda.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/icons.cpp | 4 | ||||
-rw-r--r-- | src/mir_core/src/miranda.cpp | 1 | ||||
-rw-r--r-- | src/mir_core/src/modules.cpp | 2 |
17 files changed, 21 insertions, 16 deletions
diff --git a/src/core/stdautoaway/src/main.cpp b/src/core/stdautoaway/src/main.cpp index cae20cf28f..e3270fd02d 100644 --- a/src/core/stdautoaway/src/main.cpp +++ b/src/core/stdautoaway/src/main.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadAutoAwayModule(void);
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stdaway/src/main.cpp b/src/core/stdaway/src/main.cpp index 4ea617bc4e..8d05a682fd 100644 --- a/src/core/stdaway/src/main.cpp +++ b/src/core/stdaway/src/main.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadAwayMsgModule(void);
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp index 63bf340448..7ac6277971 100644 --- a/src/core/stdclist/src/init.cpp +++ b/src/core/stdclist/src/init.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. CMPlugin g_plugin;
CLIST_INTERFACE* pcli = nullptr, coreCli;
HIMAGELIST himlCListClc = nullptr;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
// external functions
diff --git a/src/core/stdcrypt/src/main.cpp b/src/core/stdcrypt/src/main.cpp index 9633341f8c..4a295603fa 100644 --- a/src/core/stdcrypt/src/main.cpp +++ b/src/core/stdcrypt/src/main.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadEncryptionModule(void);
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stdemail/src/main.cpp b/src/core/stdemail/src/main.cpp index b767444bda..6da780ed8b 100644 --- a/src/core/stdemail/src/main.cpp +++ b/src/core/stdemail/src/main.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadSendRecvEMailModule(void);
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stdfile/src/main.cpp b/src/core/stdfile/src/main.cpp index 36ef0dcfdc..3e50600c14 100644 --- a/src/core/stdfile/src/main.cpp +++ b/src/core/stdfile/src/main.cpp @@ -26,7 +26,7 @@ int LoadSendRecvFileModule(void); CMPlugin g_plugin;
CLIST_INTERFACE* pcli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
ITaskbarList3 * pTaskbarInterface;
diff --git a/src/core/stdidle/src/main.cpp b/src/core/stdidle/src/main.cpp index fa6340963f..0131b4a427 100644 --- a/src/core/stdidle/src/main.cpp +++ b/src/core/stdidle/src/main.cpp @@ -26,7 +26,7 @@ void UnloadIdleModule(void); CMPlugin g_plugin;
CLIST_INTERFACE* pcli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp index 6d283102d6..183e2bcf08 100644 --- a/src/core/stdmsg/src/srmm.cpp +++ b/src/core/stdmsg/src/srmm.cpp @@ -27,7 +27,7 @@ void SplitmsgShutdown(void); CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stdssl/src/main.cpp b/src/core/stdssl/src/main.cpp index 6fb8898d70..5fab770f9f 100644 --- a/src/core/stdssl/src/main.cpp +++ b/src/core/stdssl/src/main.cpp @@ -25,7 +25,7 @@ int LoadSslModule(void); void UnloadSslModule(void);
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stduihist/src/main.cpp b/src/core/stduihist/src/main.cpp index c56c0bdabe..bcf31573ce 100644 --- a/src/core/stduihist/src/main.cpp +++ b/src/core/stduihist/src/main.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadHistoryModule(void);
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp index ac767568d5..6e8b25f981 100644 --- a/src/core/stduserinfo/src/main.cpp +++ b/src/core/stduserinfo/src/main.cpp @@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadUserInfoModule(void);
CMPlugin g_plugin;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/core/stduseronline/src/main.cpp b/src/core/stduseronline/src/main.cpp index 3273f7f579..027eba4d7b 100644 --- a/src/core/stduseronline/src/main.cpp +++ b/src/core/stduseronline/src/main.cpp @@ -25,7 +25,7 @@ int LoadUserOnlineModule(void); CMPlugin g_plugin;
CLIST_INTERFACE* pcli;
-int hLangpack;
+int &hLangpack(g_plugin.m_hLang);
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp index 3c6cc3da85..6fc1b0c689 100644 --- a/src/mir_app/src/CMPluginBase.cpp +++ b/src/mir_app/src/CMPluginBase.cpp @@ -47,6 +47,8 @@ void CMPluginBase::tryOpenLog() m_hLogger = mir_createLog(m_szModuleName, nullptr, path, 0); } +///////////////////////////////////////////////////////////////////////////////////////// + void CMPluginBase::debugLogA(LPCSTR szFormat, ...) { if (m_hLogger == nullptr) @@ -69,6 +71,8 @@ void CMPluginBase::debugLogW(LPCWSTR wszFormat, ...) va_end(args); } +///////////////////////////////////////////////////////////////////////////////////////// + void CMPluginBase::RegisterProtocol(int type, pfnInitProto fnInit, pfnUninitProto fnUninit) { if (type == PROTOTYPE_PROTOCOL && fnInit != nullptr) diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp index ddb648ad60..bf212c1c76 100644 --- a/src/mir_app/src/miranda.cpp +++ b/src/mir_app/src/miranda.cpp @@ -55,7 +55,7 @@ bool bModulesLoadedFired = false, bMirandaTerminated = false; int g_iIconX, g_iIconY, g_iIconSX, g_iIconSY;
CMPlugin g_plugin;
-int hLangpack = 0;
+int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/src/icons.cpp b/src/mir_core/src/icons.cpp index 5488fd645d..df3f14af9b 100644 --- a/src/mir_core/src/icons.cpp +++ b/src/mir_core/src/icons.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char *szSection, IconItem *pIcons, size_t iCount, char *prefix, int _hLang)
+MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char *szSection, IconItem *pIcons, size_t iCount, const char *prefix, int _hLang)
{
wchar_t szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
@@ -48,7 +48,7 @@ MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char *szSection, IconIte }
}
-MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const wchar_t *szSection, IconItemT *pIcons, size_t iCount, char *prefix, int _hLang)
+MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const wchar_t *szSection, IconItemT *pIcons, size_t iCount, const char *prefix, int _hLang)
{
wchar_t szFile[MAX_PATH];
GetModuleFileName(hInst, szFile, MAX_PATH);
diff --git a/src/mir_core/src/miranda.cpp b/src/mir_core/src/miranda.cpp index fda0f29a80..e4f0b50fe8 100644 --- a/src/mir_core/src/miranda.cpp +++ b/src/mir_core/src/miranda.cpp @@ -40,7 +40,6 @@ void InitMetaContacts(); void InitTimeZones();
void InitWinver();
-int hLangpack = 0;
HINSTANCE g_hInst = nullptr;
HCURSOR g_hCursorNS, g_hCursorWE;
diff --git a/src/mir_core/src/modules.cpp b/src/mir_core/src/modules.cpp index 086e584de9..6af89cbab2 100644 --- a/src/mir_core/src/modules.cpp +++ b/src/mir_core/src/modules.cpp @@ -702,6 +702,8 @@ struct CMPlugin : public CMPluginBase {} } g_plugin; +int &hLangpack(g_plugin.m_hLang); + LIST<CMPluginBase> pluginListAddr(10, HandleKeySortT); MIR_CORE_DLL(void) RegisterModule(CMPluginBase *pPlugin) |