summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /src
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'src')
-rw-r--r--src/core/stdautoaway/src/autoaway.cpp6
-rw-r--r--src/core/stdautoaway/src/main.cpp18
-rw-r--r--src/core/stdautoaway/src/stdafx.h6
-rw-r--r--src/core/stdaway/src/main.cpp18
-rw-r--r--src/core/stdaway/src/stdafx.h4
-rw-r--r--src/core/stdclist/src/init.cpp10
-rw-r--r--src/core/stdclist/src/stdafx.h4
-rw-r--r--src/core/stdcrypt/src/main.cpp18
-rw-r--r--src/core/stdcrypt/src/stdafx.h4
-rw-r--r--src/core/stdemail/src/main.cpp18
-rw-r--r--src/core/stdemail/src/stdafx.h4
-rw-r--r--src/core/stdfile/src/main.cpp18
-rw-r--r--src/core/stdfile/src/stdafx.h4
-rw-r--r--src/core/stdidle/src/main.cpp18
-rw-r--r--src/core/stdidle/src/options.cpp2
-rw-r--r--src/core/stdidle/src/stdafx.h30
-rw-r--r--src/core/stdmsg/src/srmm.cpp18
-rw-r--r--src/core/stdmsg/src/stdafx.h4
-rw-r--r--src/core/stdssl/src/main.cpp10
-rw-r--r--src/core/stdssl/src/stdafx.h4
-rw-r--r--src/core/stduihist/src/main.cpp18
-rw-r--r--src/core/stduihist/src/stdafx.h4
-rw-r--r--src/core/stduserinfo/src/main.cpp18
-rw-r--r--src/core/stduserinfo/src/stdafx.h4
-rw-r--r--src/core/stduseronline/src/main.cpp18
-rw-r--r--src/core/stduseronline/src/stdafx.h4
-rw-r--r--src/mir_app/src/CMPluginBase.cpp5
-rw-r--r--src/mir_app/src/ei_groupIcon.cpp12
-rw-r--r--src/mir_app/src/ei_icolibIcon.cpp12
-rw-r--r--src/mir_app/src/ei_options.cpp12
-rw-r--r--src/mir_app/src/ei_services.cpp12
-rw-r--r--src/mir_app/src/extraicons.h2
-rw-r--r--src/mir_app/src/mir_app.def3
-rw-r--r--src/mir_app/src/mir_app64.def3
-rw-r--r--src/mir_app/src/miranda.cpp18
-rw-r--r--src/mir_app/src/netlibhttp.cpp1
-rw-r--r--src/mir_app/src/pluginopts.cpp2
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp32
-rw-r--r--src/mir_app/src/stdafx.h5
39 files changed, 260 insertions, 143 deletions
diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp
index c5cf316d36..b926c740f2 100644
--- a/src/core/stdautoaway/src/autoaway.cpp
+++ b/src/core/stdautoaway/src/autoaway.cpp
@@ -71,16 +71,16 @@ static int AutoAwayEvent(WPARAM, LPARAM lParam)
continue;
// save old status of account and set to given status
- db_set_w(NULL, AA_MODULE, pa->szModuleName, pa->iRealStatus);
+ db_set_w(NULL, MODULENAME, pa->szModuleName, pa->iRealStatus);
Proto_SetStatus(pa->szModuleName, status);
}
else {
- int oldstatus = db_get_w(NULL, AA_MODULE, pa->szModuleName, 0);
+ int oldstatus = db_get_w(NULL, MODULENAME, pa->szModuleName, 0);
if (oldstatus != ID_STATUS_ONLINE && oldstatus != ID_STATUS_FREECHAT)
continue;
// returning from idle and this accout was set away, set it back
- db_unset(NULL, AA_MODULE, pa->szModuleName);
+ db_unset(NULL, MODULENAME, pa->szModuleName);
if (!mii.aaLock)
Proto_SetStatus(pa->szModuleName, oldstatus);
}
diff --git a/src/core/stdautoaway/src/main.cpp b/src/core/stdautoaway/src/main.cpp
index e3270fd02d..bc5d1d89ea 100644
--- a/src/core/stdautoaway/src/main.cpp
+++ b/src/core/stdautoaway/src/main.cpp
@@ -26,7 +26,9 @@ int LoadAutoAwayModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = {
{ 0x9f5ca736, 0x1108, 0x4872, {0xbe, 0xc3, 0x19, 0xc8, 0x4b, 0xc2, 0x14, 0x3b}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAWAY, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
LoadAutoAwayModule();
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stdautoaway/src/stdafx.h b/src/core/stdautoaway/src/stdafx.h
index d785f0f238..0587b8148c 100644
--- a/src/core/stdautoaway/src/stdafx.h
+++ b/src/core/stdautoaway/src/stdafx.h
@@ -65,11 +65,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../../mir_app/src/resource.h"
-#define AA_MODULE "AutoAway"
+#define MODULENAME "AutoAway"
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(AA_MODULE)
- {}
+ CMPlugin();
};
diff --git a/src/core/stdaway/src/main.cpp b/src/core/stdaway/src/main.cpp
index 8d05a682fd..09deaf6fb9 100644
--- a/src/core/stdaway/src/main.cpp
+++ b/src/core/stdaway/src/main.cpp
@@ -26,7 +26,9 @@ int LoadAwayMsgModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = {
{ 0xe58558e3, 0x83e7, 0x44ef, {0x8e, 0x39, 0xd9, 0xe0, 0x54, 0x19, 0x56, 0xdf}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRAWAY, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
LoadAwayMsgModule();
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stdaway/src/stdafx.h b/src/core/stdaway/src/stdafx.h
index 6ae1a5bd6a..3f7ba051e1 100644
--- a/src/core/stdaway/src/stdafx.h
+++ b/src/core/stdaway/src/stdafx.h
@@ -70,7 +70,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULENAME)
- {}
+ CMPlugin();
};
diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp
index 7ac6277971..f499cc0134 100644
--- a/src/core/stdclist/src/init.cpp
+++ b/src/core/stdclist/src/init.cpp
@@ -43,7 +43,7 @@ int CListOptInit(WPARAM wParam, LPARAM lParam);
/////////////////////////////////////////////////////////////////////////////////////////
// returns the plugin information
-PLUGININFOEX pluginInfo = {
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -56,9 +56,13 @@ PLUGININFOEX pluginInfo = {
{ 0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe2 } }
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>("CList", pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -109,7 +113,7 @@ static INT_PTR GetStatusMode(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int CListInitialise()
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
g_bSortByStatus = db_get_b(NULL, "CList", "SortByStatus", SETTING_SORTBYSTATUS_DEFAULT);
diff --git a/src/core/stdclist/src/stdafx.h b/src/core/stdclist/src/stdafx.h
index 3803aa1214..f42349b00f 100644
--- a/src/core/stdclist/src/stdafx.h
+++ b/src/core/stdclist/src/stdafx.h
@@ -58,9 +58,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>("CList")
- {}
+ CMPlugin();
};
// shared vars
diff --git a/src/core/stdcrypt/src/main.cpp b/src/core/stdcrypt/src/main.cpp
index 4a295603fa..011511d37b 100644
--- a/src/core/stdcrypt/src/main.cpp
+++ b/src/core/stdcrypt/src/main.cpp
@@ -25,7 +25,9 @@ int LoadEncryptionModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -38,20 +40,30 @@ PLUGININFOEX pluginInfo = {
{ 0xd3637189, 0xa5a5, 0x41f5, {0xbc, 0x72, 0x67, 0xa2, 0xf8, 0xaf, 0x1b, 0x6f}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_CRYPTO, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
return LoadEncryptionModule();
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stdcrypt/src/stdafx.h b/src/core/stdcrypt/src/stdafx.h
index c10671bcca..8cc54ff399 100644
--- a/src/core/stdcrypt/src/stdafx.h
+++ b/src/core/stdcrypt/src/stdafx.h
@@ -69,9 +69,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(nullptr)
- {}
+ CMPlugin();
};
bool getRandomBytes(BYTE *buf, size_t bufLen);
diff --git a/src/core/stdemail/src/main.cpp b/src/core/stdemail/src/main.cpp
index 6da780ed8b..5197155945 100644
--- a/src/core/stdemail/src/main.cpp
+++ b/src/core/stdemail/src/main.cpp
@@ -26,7 +26,9 @@ int LoadSendRecvEMailModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = {
{0xb774d10a, 0xc761, 0x11e1, {0x84, 0x05, 0x27, 0xe7, 0x61, 0x88, 0x70, 0x9b }}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SREMAIL, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
LoadSendRecvEMailModule();
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stdemail/src/stdafx.h b/src/core/stdemail/src/stdafx.h
index e9a3f62ed1..aa4037b703 100644
--- a/src/core/stdemail/src/stdafx.h
+++ b/src/core/stdemail/src/stdafx.h
@@ -66,7 +66,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(nullptr)
- {}
+ CMPlugin();
};
diff --git a/src/core/stdfile/src/main.cpp b/src/core/stdfile/src/main.cpp
index 3e50600c14..d1ca18c66d 100644
--- a/src/core/stdfile/src/main.cpp
+++ b/src/core/stdfile/src/main.cpp
@@ -30,7 +30,9 @@ int &hLangpack(g_plugin.m_hLang);
ITaskbarList3 * pTaskbarInterface;
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -43,16 +45,24 @@ PLUGININFOEX pluginInfo = {
{ 0x39698dce, 0x7ed4, 0x4334, {0xac, 0x4c, 0xba, 0x8b, 0x37, 0xa8, 0x6f, 0x13}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRFILE, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
if ( IsWinVer7Plus())
@@ -62,6 +72,8 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
if (pTaskbarInterface)
diff --git a/src/core/stdfile/src/stdafx.h b/src/core/stdfile/src/stdafx.h
index 2edc930862..d763d8ae9a 100644
--- a/src/core/stdfile/src/stdafx.h
+++ b/src/core/stdfile/src/stdafx.h
@@ -76,9 +76,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULENAME)
- {}
+ CMPlugin();
};
extern ITaskbarList3 * pTaskbarInterface;
diff --git a/src/core/stdidle/src/main.cpp b/src/core/stdidle/src/main.cpp
index 0131b4a427..5f7a5bb00e 100644
--- a/src/core/stdidle/src/main.cpp
+++ b/src/core/stdidle/src/main.cpp
@@ -28,7 +28,9 @@ CMPlugin g_plugin;
CLIST_INTERFACE* pcli;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -41,22 +43,32 @@ PLUGININFOEX pluginInfo = {
{ 0x53ac190b, 0xe223, 0x4341, {0x82, 0x5f, 0x70, 0x9d, 0x85, 0x20, 0x21, 0x5b}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_IDLE, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
LoadIdleModule();
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
UnloadIdleModule();
diff --git a/src/core/stdidle/src/options.cpp b/src/core/stdidle/src/options.cpp
index 5da1144b09..8d34a2909a 100644
--- a/src/core/stdidle/src/options.cpp
+++ b/src/core/stdidle/src/options.cpp
@@ -57,7 +57,7 @@ class COptionsDlg : public CPluginDlgBase
public:
COptionsDlg() :
- CPluginDlgBase(g_plugin, IDD_OPT_IDLE, IDLEMOD),
+ CPluginDlgBase(g_plugin, IDD_OPT_IDLE, MODULENAME),
edt1sttime(this, IDC_IDLE1STTIME),
spinIdle(this, IDC_IDLESPIN),
cmbAAStatus(this, IDC_AASTATUS),
diff --git a/src/core/stdidle/src/stdafx.h b/src/core/stdidle/src/stdafx.h
index 5eff95b29b..e313a5d426 100644
--- a/src/core/stdidle/src/stdafx.h
+++ b/src/core/stdidle/src/stdafx.h
@@ -65,30 +65,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../../mir_app/src/resource.h"
-#define IDLEMOD "Idle"
+#define MODULENAME "Idle"
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(IDLEMOD)
- {}
+ CMPlugin();
};
struct Settings
{
Settings() :
- bIdleCheck(IDLEMOD, "UserIdleCheck", 0),
- bIdleMethod(IDLEMOD, "IdleMethod", 0),
- bIdleOnSaver(IDLEMOD, "IdleOnSaver", 0),
- bIdleOnFullScr(IDLEMOD, "IdleOnFullScr", 0),
- bIdleOnLock(IDLEMOD, "IdleOnLock", 0),
- bIdlePrivate(IDLEMOD, "IdlePrivate", 0),
- bIdleSoundsOff(IDLEMOD, "IdleSoundsOff", 1),
- bIdleOnTerminal(IDLEMOD, "IdleOnTerminalDisconnect", 0),
- bIdleStatusLock(IDLEMOD, "IdleStatusLock", 0),
- bAAEnable(IDLEMOD, "AAEnable", 0),
- bAAStatus(IDLEMOD, "AAStatus", 0),
- iIdleTime1st(IDLEMOD, "IdleTime1st", 10)
+ bIdleCheck(MODULENAME, "UserIdleCheck", 0),
+ bIdleMethod(MODULENAME, "IdleMethod", 0),
+ bIdleOnSaver(MODULENAME, "IdleOnSaver", 0),
+ bIdleOnFullScr(MODULENAME, "IdleOnFullScr", 0),
+ bIdleOnLock(MODULENAME, "IdleOnLock", 0),
+ bIdlePrivate(MODULENAME, "IdlePrivate", 0),
+ bIdleSoundsOff(MODULENAME, "IdleSoundsOff", 1),
+ bIdleOnTerminal(MODULENAME, "IdleOnTerminalDisconnect", 0),
+ bIdleStatusLock(MODULENAME, "IdleStatusLock", 0),
+ bAAEnable(MODULENAME, "AAEnable", 0),
+ bAAStatus(MODULENAME, "AAStatus", 0),
+ iIdleTime1st(MODULENAME, "IdleTime1st", 10)
{}
CMOption<BYTE> bIdleCheck, bIdleMethod, bIdleOnSaver, bIdleOnFullScr, bIdleOnLock;
diff --git a/src/core/stdmsg/src/srmm.cpp b/src/core/stdmsg/src/srmm.cpp
index 183e2bcf08..612e3b59c3 100644
--- a/src/core/stdmsg/src/srmm.cpp
+++ b/src/core/stdmsg/src/srmm.cpp
@@ -29,7 +29,9 @@ CMPlugin g_plugin;
CLIST_INTERFACE *pcli;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -41,22 +43,32 @@ PLUGININFOEX pluginInfo = {
{ 0x657fe89b, 0xd121, 0x40c2, { 0x8a, 0xc9, 0xb9, 0xfa, 0x57, 0x55, 0xb3, 0x0D } } //{657FE89B-D121-40c2-8AC9-B9FA5755B30D}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(SRMMMOD, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SRMM, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
Load_ChatModule();
return LoadSendRecvMessageModule();
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
SplitmsgShutdown();
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index 8654d9153d..6f1875347d 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -108,9 +108,7 @@ struct GlobalLogSettings : public GlobalLogSettingsBase
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(SRMMMOD)
- {}
+ CMPlugin();
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdssl/src/main.cpp b/src/core/stdssl/src/main.cpp
index 5fab770f9f..18fde05196 100644
--- a/src/core/stdssl/src/main.cpp
+++ b/src/core/stdssl/src/main.cpp
@@ -27,7 +27,7 @@ void UnloadSslModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -40,16 +40,20 @@ PLUGININFOEX pluginInfo = {
{ 0x312C4F84, 0x75BE, 0x4404, {0xBC, 0xB1, 0xC1, 0x03, 0xDB, 0xE5, 0xA3, 0xB8 }}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_SSL, MIID_LAST };
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
return LoadSslModule();
}
diff --git a/src/core/stdssl/src/stdafx.h b/src/core/stdssl/src/stdafx.h
index 6221d6c3b4..8f875605f0 100644
--- a/src/core/stdssl/src/stdafx.h
+++ b/src/core/stdssl/src/stdafx.h
@@ -42,7 +42,5 @@ typedef struct SslHandle *HSSL;
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(nullptr)
- {}
+ CMPlugin();
};
diff --git a/src/core/stduihist/src/main.cpp b/src/core/stduihist/src/main.cpp
index bcf31573ce..b9e2bd1fd5 100644
--- a/src/core/stduihist/src/main.cpp
+++ b/src/core/stduihist/src/main.cpp
@@ -26,7 +26,9 @@ int LoadHistoryModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = {
{ 0x5eedf3c5, 0x3071, 0x4234, {0xa6, 0x27, 0xef, 0xd0, 0x62, 0xa4, 0xd6, 0x94}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIHISTORY, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
LoadHistoryModule();
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stduihist/src/stdafx.h b/src/core/stduihist/src/stdafx.h
index c07a081180..5dfae67b52 100644
--- a/src/core/stduihist/src/stdafx.h
+++ b/src/core/stduihist/src/stdafx.h
@@ -66,9 +66,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(nullptr)
- {}
+ CMPlugin();
};
#pragma comment(lib, "version.lib")
diff --git a/src/core/stduserinfo/src/main.cpp b/src/core/stduserinfo/src/main.cpp
index 6e8b25f981..5a331de50c 100644
--- a/src/core/stduserinfo/src/main.cpp
+++ b/src/core/stduserinfo/src/main.cpp
@@ -26,7 +26,9 @@ int LoadUserInfoModule(void);
CMPlugin g_plugin;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -39,21 +41,31 @@ PLUGININFOEX pluginInfo = {
{ 0x8198dc94, 0xbc4, 0x448a, { 0x84, 0x95, 0x8f, 0xe8, 0x32, 0xc1, 0xd3, 0x33 } }
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_UIUSERINFO, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
LoadUserInfoModule();
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stduserinfo/src/stdafx.h b/src/core/stduserinfo/src/stdafx.h
index 814e260abb..e73f080e88 100644
--- a/src/core/stduserinfo/src/stdafx.h
+++ b/src/core/stduserinfo/src/stdafx.h
@@ -70,7 +70,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULENAME)
- {}
+ CMPlugin();
};
diff --git a/src/core/stduseronline/src/main.cpp b/src/core/stduseronline/src/main.cpp
index 027eba4d7b..ebbdf4f496 100644
--- a/src/core/stduseronline/src/main.cpp
+++ b/src/core/stduseronline/src/main.cpp
@@ -27,7 +27,9 @@ CMPlugin g_plugin;
CLIST_INTERFACE* pcli;
int &hLangpack(g_plugin.m_hLang);
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
MIRANDA_VERSION_DWORD,
@@ -40,22 +42,32 @@ PLUGININFOEX pluginInfo = {
{ 0x251c78d7, 0xf6e0, 0x4083, {0x92, 0xdc, 0x25, 0x2d, 0xcb, 0x3b, 0xe7, 0x24}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_USERONLINE, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
LoadUserOnlineModule();
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/src/core/stduseronline/src/stdafx.h b/src/core/stduseronline/src/stdafx.h
index 9fae72e8ed..aa1da528da 100644
--- a/src/core/stduseronline/src/stdafx.h
+++ b/src/core/stduseronline/src/stdafx.h
@@ -68,7 +68,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(MODULENAME)
- {}
+ CMPlugin();
};
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index fd7174a1bb..a5b18e2938 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -68,8 +68,9 @@ MIR_APP_DLL(CMPluginBase&) GetPluginByInstance(HINSTANCE hInst)
/////////////////////////////////////////////////////////////////////////////////////////
-CMPluginBase::CMPluginBase(const char *moduleName) :
- m_szModuleName(moduleName)
+CMPluginBase::CMPluginBase(const char *moduleName, const PLUGININFOEX &pInfo) :
+ m_szModuleName(moduleName),
+ m_pInfo(pInfo)
{
if (m_hInst != nullptr)
pluginListAddr.insert(this);
diff --git a/src/mir_app/src/ei_groupIcon.cpp b/src/mir_app/src/ei_groupIcon.cpp
index b46ce97dcc..7bc068c32e 100644
--- a/src/mir_app/src/ei_groupIcon.cpp
+++ b/src/mir_app/src/ei_groupIcon.cpp
@@ -27,7 +27,7 @@ ExtraIconGroup::ExtraIconGroup(const char *_name) :
ExtraIcon(_name), m_setValidExtraIcon(false), m_insideApply(false),
m_items(1)
{
- db_set_resident(MODULE_NAME, _name);
+ db_set_resident(EI_MODULE_NAME, _name);
}
ExtraIconGroup::~ExtraIconGroup()
@@ -71,7 +71,7 @@ void ExtraIconGroup::applyIcon(MCONTACT hContact)
m_insideApply = false;
- db_set_dw(hContact, MODULE_NAME, m_szName, m_setValidExtraIcon ? m_items[i]->getID() : 0);
+ db_set_dw(hContact, EI_MODULE_NAME, m_szName, m_setValidExtraIcon ? m_items[i]->getID() : 0);
}
int ExtraIconGroup::getPosition() const
@@ -92,7 +92,7 @@ void ExtraIconGroup::setSlot(int slot)
ExtraIcon * ExtraIconGroup::getCurrentItem(MCONTACT hContact) const
{
- int id = (int)db_get_dw(hContact, MODULE_NAME, m_szName, 0);
+ int id = (int)db_get_dw(hContact, EI_MODULE_NAME, m_szName, 0);
if (id < 1)
return nullptr;
@@ -164,11 +164,11 @@ int ExtraIconGroup::internalSetIcon(int id, MCONTACT hContact, HANDLE value, boo
if (storePos < currentPos) {
if (m_setValidExtraIcon)
- db_set_dw(hContact, MODULE_NAME, m_szName, m_items[storePos]->getID());
+ db_set_dw(hContact, EI_MODULE_NAME, m_szName, m_items[storePos]->getID());
}
else if (storePos == currentPos) {
if (!m_setValidExtraIcon) {
- db_set_dw(hContact, MODULE_NAME, m_szName, 0);
+ db_set_dw(hContact, EI_MODULE_NAME, m_szName, 0);
m_insideApply = true;
@@ -181,7 +181,7 @@ int ExtraIconGroup::internalSetIcon(int id, MCONTACT hContact, HANDLE value, boo
m_insideApply = false;
if (m_setValidExtraIcon && storePos < m_items.getCount())
- db_set_dw(hContact, MODULE_NAME, m_szName, m_items[storePos]->getID());
+ db_set_dw(hContact, EI_MODULE_NAME, m_szName, m_items[storePos]->getID());
}
}
diff --git a/src/mir_app/src/ei_icolibIcon.cpp b/src/mir_app/src/ei_icolibIcon.cpp
index 44cd0ab8b1..31b6e0ef49 100644
--- a/src/mir_app/src/ei_icolibIcon.cpp
+++ b/src/mir_app/src/ei_icolibIcon.cpp
@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA.
IcolibExtraIcon::IcolibExtraIcon(int _id, const char *_name, const wchar_t *_description, const char *_descIcon, MIRANDAHOOKPARAM _OnClick, LPARAM _param) :
BaseExtraIcon(_id, _name, _description, _descIcon, _OnClick, _param)
{
- db_set_resident(MODULE_NAME, _name);
+ db_set_resident(EI_MODULE_NAME, _name);
}
IcolibExtraIcon::~IcolibExtraIcon()
@@ -52,7 +52,7 @@ void IcolibExtraIcon::applyIcon(MCONTACT hContact)
HANDLE hImage = INVALID_HANDLE_VALUE;
- ptrA szIconName(db_get_sa(hContact, MODULE_NAME, m_szName));
+ ptrA szIconName(db_get_sa(hContact, EI_MODULE_NAME, m_szName));
if (!IsEmpty(szIconName))
hImage = GetIcon(szIconName);
@@ -68,7 +68,7 @@ int IcolibExtraIcon::setIcon(int id, MCONTACT hContact, HANDLE hIcoLib)
hIcoLib = nullptr;
if (isEnabled()) {
- ptrA szIconName(db_get_sa(hContact, MODULE_NAME, m_szName));
+ ptrA szIconName(db_get_sa(hContact, EI_MODULE_NAME, m_szName));
if (!IsEmpty(szIconName))
RemoveIcon(szIconName);
}
@@ -92,7 +92,7 @@ int IcolibExtraIcon::setIconByName(int id, MCONTACT hContact, const char *icon)
icon = nullptr;
if (isEnabled()) {
- ptrA szIconName(db_get_sa(hContact, MODULE_NAME, m_szName));
+ ptrA szIconName(db_get_sa(hContact, EI_MODULE_NAME, m_szName));
if (!IsEmpty(szIconName))
RemoveIcon(szIconName);
}
@@ -112,7 +112,7 @@ void IcolibExtraIcon::storeIcon(MCONTACT hContact, void *icon)
const char *icolibName = (const char *)icon;
if (IsEmpty(icolibName))
- db_unset(hContact, MODULE_NAME, m_szName);
+ db_unset(hContact, EI_MODULE_NAME, m_szName);
else
- db_set_s(hContact, MODULE_NAME, m_szName, icolibName);
+ db_set_s(hContact, EI_MODULE_NAME, m_szName, icolibName);
}
diff --git a/src/mir_app/src/ei_options.cpp b/src/mir_app/src/ei_options.cpp
index c21f37b4cf..35babf713b 100644
--- a/src/mir_app/src/ei_options.cpp
+++ b/src/mir_app/src/ei_options.cpp
@@ -360,26 +360,26 @@ public:
for (auto &extra : registeredExtraIcons) {
char setting[512];
mir_snprintf(setting, "Position_%s", extra->getName());
- db_set_w(0, MODULE_NAME, setting, extra->getPosition());
+ db_set_w(0, EI_MODULE_NAME, setting, extra->getPosition());
mir_snprintf(setting, "Slot_%s", extra->getName());
- db_set_w(0, MODULE_NAME, setting, extra->getSlot());
+ db_set_w(0, EI_MODULE_NAME, setting, extra->getSlot());
}
- db_delete_module(0, MODULE_NAME "Groups");
- db_set_w(0, MODULE_NAME "Groups", "Count", groups.getCount());
+ db_delete_module(0, EI_MODULE_NAME "Groups");
+ db_set_w(0, EI_MODULE_NAME "Groups", "Count", groups.getCount());
for (int k = 0; k < groups.getCount(); k++) {
ExtraIconGroup *group = groups[k];
char setting[512];
mir_snprintf(setting, "%d_count", k);
- db_set_w(0, MODULE_NAME "Groups", setting, (WORD)group->m_items.getCount());
+ db_set_w(0, EI_MODULE_NAME "Groups", setting, (WORD)group->m_items.getCount());
for (int j = 0; j < group->m_items.getCount(); j++) {
BaseExtraIcon *extra = group->m_items[j];
mir_snprintf(setting, "%d_%d", k, j);
- db_set_s(0, MODULE_NAME "Groups", setting, extra->getName());
+ db_set_s(0, EI_MODULE_NAME "Groups", setting, extra->getName());
}
}
diff --git a/src/mir_app/src/ei_services.cpp b/src/mir_app/src/ei_services.cpp
index d1a7b7e395..11aa883910 100644
--- a/src/mir_app/src/ei_services.cpp
+++ b/src/mir_app/src/ei_services.cpp
@@ -121,11 +121,11 @@ BaseExtraIcon* GetExtraIconByName(const char *name)
static void LoadGroups(LIST<ExtraIconGroup> &groups)
{
- int count = db_get_w(0, MODULE_NAME "Groups", "Count", 0);
+ int count = db_get_w(0, EI_MODULE_NAME "Groups", "Count", 0);
for (int i = 0; i < count; i++) {
char setting[512];
mir_snprintf(setting, "%d_count", i);
- unsigned int items = db_get_w(0, MODULE_NAME "Groups", setting, 0);
+ unsigned int items = db_get_w(0, EI_MODULE_NAME "Groups", setting, 0);
if (items < 1)
continue;
@@ -134,7 +134,7 @@ static void LoadGroups(LIST<ExtraIconGroup> &groups)
for (unsigned int j = 0; j < items; j++) {
mir_snprintf(setting, "%d_%d", i, j);
- ptrA szIconName(db_get_sa(0, MODULE_NAME "Groups", setting));
+ ptrA szIconName(db_get_sa(0, EI_MODULE_NAME "Groups", setting));
if (IsEmpty(szIconName))
continue;
@@ -322,15 +322,15 @@ static void EI_PostCreate(BaseExtraIcon *extra, const char *name, int flags)
{
char setting[512];
mir_snprintf(setting, "Position_%s", name);
- extra->setPosition(db_get_w(0, MODULE_NAME, setting, 1000));
+ extra->setPosition(db_get_w(0, EI_MODULE_NAME, setting, 1000));
mir_snprintf(setting, "Slot_%s", name);
- int slot = db_get_w(0, MODULE_NAME, setting, -100);
+ int slot = db_get_w(0, EI_MODULE_NAME, setting, -100);
if (slot == EMPTY_EXTRA_ICON)
slot = -1;
else if (slot == -100) {
if (flags & EIF_DISABLED_BY_DEFAULT) {
- db_set_w(0, MODULE_NAME, setting, EMPTY_EXTRA_ICON);
+ db_set_w(0, EI_MODULE_NAME, setting, EMPTY_EXTRA_ICON);
slot = -1;
}
else slot = 1;
diff --git a/src/mir_app/src/extraicons.h b/src/mir_app/src/extraicons.h
index fd896b3516..6df8be8b7d 100644
--- a/src/mir_app/src/extraicons.h
+++ b/src/mir_app/src/extraicons.h
@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA.
#ifndef __EXTRAICONS_H__
# define __EXTRAICONS_H__
-#define MODULE_NAME "ExtraIcons"
+#define EI_MODULE_NAME "ExtraIcons"
// Global Variables
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 51440ad771..7a3868195a 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -483,9 +483,8 @@ GetDatabasePlugin @508
SetServiceModePlugin @510
Proto_CreateAccount @511
Proto_GetAverageStatus @512
-??0CMPluginBase@@IAE@PBD@Z @513 NONAME
+??0CMPluginBase@@IAE@PBDABUPLUGININFOEX@@@Z @513 NONAME
??1CMPluginBase@@IAE@XZ @514 NONAME
-??4CMPluginBase@@QAEAAV0@ABV0@@Z @515 NONAME
?debugLogA@CMPluginBase@@QAAXPBDZZ @516 NONAME
?debugLogW@CMPluginBase@@QAAXPB_WZZ @517 NONAME
?delSetting@CMPluginBase@@QAEHIPBD@Z @518 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 2073ce5374..5e8ddd4069 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -483,9 +483,8 @@ GetDatabasePlugin @508
SetServiceModePlugin @510
Proto_CreateAccount @511
Proto_GetAverageStatus @512
-??0CMPluginBase@@IEAA@PEBD@Z @513 NONAME
+??0CMPluginBase@@IEAA@PEBDAEBUPLUGININFOEX@@@Z @513 NONAME
??1CMPluginBase@@IEAA@XZ @514 NONAME
-??4CMPluginBase@@QEAAAEAV0@AEBV0@@Z @515 NONAME
?debugLogA@CMPluginBase@@QEAAXPEBDZZ @516 NONAME
?debugLogW@CMPluginBase@@QEAAXPEB_WZZ @517 NONAME
?delSetting@CMPluginBase@@QEAA_JIPEBD@Z @518 NONAME
diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp
index bf212c1c76..bcd2949b45 100644
--- a/src/mir_app/src/miranda.cpp
+++ b/src/mir_app/src/miranda.cpp
@@ -59,6 +59,24 @@ int &hLangpack(g_plugin.m_hLang);
/////////////////////////////////////////////////////////////////////////////////////////
+static PLUGININFOEX pluginInfoEx = {
+ sizeof(PLUGININFOEX),
+ "Miranda NG",
+ MIRANDA_VERSION_DWORD,
+ "",
+ "Miranda NG team",
+ LEGAL_COPYRIGHT,
+ "https://miranda-ng.org",
+ UNICODE_AWARE,
+ MIID_LAST
+};
+
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(nullptr, pluginInfoEx)
+{}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
struct MWaitableObject
{
MWaitableObject(MWaitableStub pFunc, HANDLE hEvent) :
diff --git a/src/mir_app/src/netlibhttp.cpp b/src/mir_app/src/netlibhttp.cpp
index e011421e53..3e65391eb0 100644
--- a/src/mir_app/src/netlibhttp.cpp
+++ b/src/mir_app/src/netlibhttp.cpp
@@ -25,7 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "../libs/zlib/src/zlib.h"
#include "netlib.h"
-#include "m_version.h"
#define HTTPRECVHEADERSTIMEOUT 30000 //in ms
#define HTTPRECVDATATIMEOUT 20000
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp
index a6d6209276..4ae83a6145 100644
--- a/src/mir_app/src/pluginopts.cpp
+++ b/src/mir_app/src/pluginopts.cpp
@@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-#include <m_version.h>
-
#include "chat.h"
#include "plugins.h"
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 8a66992b52..103c1e4020 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "chat.h"
#include "skin.h"
-#define MODULENAME "SRMM_Toolbar"
+#define EI_MODULE_NAME "SRMM_Toolbar"
#define DPISCALEY_S(argY) ((int)((double)(argY) * g_DPIscaleY))
#define DPISCALEX_S(argX) ((int)((double)(argX) * g_DPIscaleX))
@@ -127,7 +127,7 @@ MIR_APP_DLL(HANDLE) Srmm_AddButton(const BBButton *bbdi, int _hLang)
mir_snprintf(SettingName, "%s_%d", cbd->m_pszModuleName, cbd->m_dwButtonID);
DBVARIANT dbv = { 0 };
- if (!db_get_s(0, MODULENAME, SettingName, &dbv)) {
+ if (!db_get_s(0, EI_MODULE_NAME, SettingName, &dbv)) {
// modulename_buttonID, position_inIM_inCHAT_isLSide_isRSide_CanBeHidden
char *token = strtok(dbv.pszVal, "_");
cbd->m_dwPosition = (DWORD)atoi(token);
@@ -451,9 +451,9 @@ static void CB_WriteButtonSettings(MCONTACT hContact, CustomButtonData *cbd)
mir_snprintf(SettingName, "%s_%d", cbd->m_pszModuleName, cbd->m_dwButtonID);
mir_snprintf(SettingParameter, "%d_%u_%u_%u_%u_%u", cbd->m_dwPosition, cbd->m_bIMButton, cbd->m_bChatButton, 0, cbd->m_bRSided, cbd->m_bCanBeHidden);
if (!(cbd->m_opFlags & BBSF_NTBDESTRUCT))
- db_set_s(hContact, MODULENAME, SettingName, SettingParameter);
+ db_set_s(hContact, EI_MODULE_NAME, SettingName, SettingParameter);
else
- db_unset(hContact, MODULENAME, SettingName);
+ db_unset(hContact, EI_MODULE_NAME, SettingName);
}
#define MIDDLE_SEPARATOR L">-------M-------<"
@@ -540,7 +540,7 @@ class CSrmmToolbarOptions : public CDlgBase
qsort(arButtonsList.getArray(), arButtonsList.getCount(), sizeof(void*), sstSortButtons);
}
- db_set_dw(0, MODULENAME, "SeparatorsCount", loc_sepcout);
+ db_set_dw(0, EI_MODULE_NAME, "SeparatorsCount", loc_sepcout);
dwSepCount = loc_sepcout;
}
@@ -629,7 +629,7 @@ public:
m_btnHidden.Disable();
m_gap.SetRange(10);
- m_gap.SetPosition(db_get_b(0, MODULENAME, "ButtonsBarGap", 1));
+ m_gap.SetPosition(db_get_b(0, EI_MODULE_NAME, "ButtonsBarGap", 1));
}
virtual void OnDestroy() override
@@ -645,9 +645,9 @@ public:
CB_ReInitCustomButtons();
WORD newGap = m_gap.GetPosition();
- if (newGap != db_get_b(0, MODULENAME, "ButtonsBarGap", 1)) {
+ if (newGap != db_get_b(0, EI_MODULE_NAME, "ButtonsBarGap", 1)) {
WindowList_BroadcastAsync(g_hWindowList, WM_SIZE, 0, 0);
- db_set_b(0, MODULENAME, "ButtonsBarGap", newGap);
+ db_set_b(0, EI_MODULE_NAME, "ButtonsBarGap", newGap);
}
BuildMenuObjectsTree();
@@ -660,12 +660,12 @@ public:
virtual void OnReset() override
{
CB_ReInitCustomButtons();
- dwSepCount = db_get_dw(0, MODULENAME, "SeparatorsCount", 0);
+ dwSepCount = db_get_dw(0, EI_MODULE_NAME, "SeparatorsCount", 0);
}
void btnResetClicked(void*)
{
- db_delete_module(0, MODULENAME);
+ db_delete_module(0, EI_MODULE_NAME);
Srmm_ResetToolbar();
qsort(arButtonsList.getArray(), arButtonsList.getCount(), sizeof(void*), sstSortButtons);
@@ -813,8 +813,8 @@ static void CALLBACK SrmmLoadToolbar()
static int ConvertToolbarData(const char *szSetting, void*)
{
DBVARIANT dbv;
- if (!db_get(0, "Tab" MODULENAME, szSetting, &dbv)) {
- db_set(0, MODULENAME, szSetting, &dbv);
+ if (!db_get(0, "Tab" EI_MODULE_NAME, szSetting, &dbv)) {
+ db_set(0, EI_MODULE_NAME, szSetting, &dbv);
db_free(&dbv);
}
return 0;
@@ -837,12 +837,12 @@ void LoadSrmmToolbarModule()
ReleaseDC(nullptr, hScrnDC);
// old data? convert them
- if (db_get_dw(0, "Tab" MODULENAME, "SeparatorsCount", -1) != -1) {
- db_enum_settings(0, ConvertToolbarData, "Tab" MODULENAME, nullptr);
- db_delete_module(0, "Tab" MODULENAME);
+ if (db_get_dw(0, "Tab" EI_MODULE_NAME, "SeparatorsCount", -1) != -1) {
+ db_enum_settings(0, ConvertToolbarData, "Tab" EI_MODULE_NAME, nullptr);
+ db_delete_module(0, "Tab" EI_MODULE_NAME);
}
- dwSepCount = db_get_dw(0, MODULENAME, "SeparatorsCount", 0);
+ dwSepCount = db_get_dw(0, EI_MODULE_NAME, "SeparatorsCount", 0);
CB_RegisterSeparators();
}
diff --git a/src/mir_app/src/stdafx.h b/src/mir_app/src/stdafx.h
index e6c82f8609..5622b60d72 100644
--- a/src/mir_app/src/stdafx.h
+++ b/src/mir_app/src/stdafx.h
@@ -93,6 +93,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_gui.h>
#include <m_srmm_int.h>
#include <m_imgsrvc.h>
+#include <m_version.h>
#include "miranda.h"
@@ -107,7 +108,5 @@ typedef struct GlobalLogSettingsBase GlobalLogSettings;
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>(nullptr)
- {}
+ CMPlugin();
};