diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:08:48 +0300 |
commit | 8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch) | |
tree | 03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/AddContactPlus/src | |
parent | c5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff) |
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/AddContactPlus/src')
-rw-r--r-- | plugins/AddContactPlus/src/addcontact.cpp | 8 | ||||
-rw-r--r-- | plugins/AddContactPlus/src/main.cpp | 10 | ||||
-rw-r--r-- | plugins/AddContactPlus/src/stdafx.h | 6 |
3 files changed, 14 insertions, 10 deletions
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 5bb5c3212f..da5163cea8 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -156,7 +156,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) acs = new AddDialogParam();
SetWindowLongPtr(hdlg, GWLP_USERDATA, (LONG_PTR)acs);
- Utils_RestoreWindowPositionNoSize(hdlg, NULL, "AddContact", "");
+ Utils_RestoreWindowPositionNoSize(hdlg, NULL, MODULENAME, "");
TranslateDialogDefault(hdlg);
Window_SetIcon_IcoLib(hdlg, IcoLib_GetIconHandle(ICON_ADD));
@@ -172,7 +172,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) SendDlgItemMessage(hdlg, IDC_GROUP, CB_INSERTSTRING, 0, (LPARAM)TranslateT("None"));
SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETCURSEL, 0, 0);
{
- ptrA szProto(db_get_sa(NULL, "AddContact", "LastProto"));
+ ptrA szProto(db_get_sa(NULL, MODULENAME, "LastProto"));
if (szProto)
acs->proto = szProto;
}
@@ -317,7 +317,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) Window_FreeIcon_IcoLib(hdlg);
ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_GETIMAGELIST, 0, 0));
if (acs) {
- db_set_s(NULL, "AddContact", "LastProto", acs->proto);
+ db_set_s(NULL, MODULENAME, "LastProto", acs->proto);
if (acs->psr) {
mir_free(acs->psr->nick.w);
mir_free(acs->psr->firstName.w);
@@ -327,7 +327,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) }
delete acs;
}
- Utils_SaveWindowPosition(hdlg, NULL, "AddContact", "");
+ Utils_SaveWindowPosition(hdlg, NULL, MODULENAME, "");
break;
}
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index 7c26887820..8f0456c7de 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -36,7 +36,7 @@ static IconItem icon[] = /////////////////////////////////////////////////////////////////////////////////////////
-PLUGININFOEX pluginInfo =
+PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -50,9 +50,13 @@ PLUGININFOEX pluginInfo = {0x6471d451, 0x2fe0, 0x4ee2, {0x85, 0xe, 0x9f, 0x84, 0xf3, 0xc0, 0xd1, 0x87}}
};
+CMPlugin::CMPlugin() :
+ PLUGIN<CMPlugin>(MODULENAME, pluginInfoEx)
+{}
+
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- return &pluginInfo;
+ return &pluginInfoEx;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -135,7 +139,7 @@ static int OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
- mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
INITCOMMONCONTROLSEX icex = { sizeof(icex), ICC_USEREX_CLASSES };
diff --git a/plugins/AddContactPlus/src/stdafx.h b/plugins/AddContactPlus/src/stdafx.h index 8626486757..c8f890020e 100644 --- a/plugins/AddContactPlus/src/stdafx.h +++ b/plugins/AddContactPlus/src/stdafx.h @@ -44,11 +44,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "resource.h"
#include "version.h"
+#define MODULENAME "AddContact"
+
struct CMPlugin : public PLUGIN<CMPlugin>
{
- CMPlugin() :
- PLUGIN<CMPlugin>("AddContact")
- {}
+ CMPlugin();
};
#define ICON_ADD "AddContactPlus_Icon"
|