diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-18 21:56:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-18 21:56:03 +0300 |
commit | cb4d31922f0690f5a3c79526245c963bfd118864 (patch) | |
tree | a6826371092617844c19772e73bf4e5756400140 /plugins/AddContactPlus/src | |
parent | 37a022d37e79dbe9892f376ef7c3b6b8878c4aff (diff) |
Icon_Register(g_plugin.getInst() => g_plugin.registerIcon
Icon_RegisterT(g_plugin.getInst() => g_plugin.registerIconW
Diffstat (limited to 'plugins/AddContactPlus/src')
-rw-r--r-- | plugins/AddContactPlus/src/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp index fd83d2fd7c..7c26887820 100644 --- a/plugins/AddContactPlus/src/main.cpp +++ b/plugins/AddContactPlus/src/main.cpp @@ -29,7 +29,10 @@ static HANDLE hToolBarItem = nullptr; static HGENMENU hMainMenuItem = nullptr;
HWND hAddDlg;
-static IconItem icon = { LPGEN("Add contact"), ICON_ADD, IDI_ADDCONTACT };
+static IconItem icon[] =
+{
+ { LPGEN("Add contact"), ICON_ADD, IDI_ADDCONTACT }
+};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -85,7 +88,7 @@ static int OnAccListChanged(WPARAM, LPARAM) SET_UID(mi, 0xb19db907, 0x870e, 0x49fa, 0xa7, 0x1e, 0x43, 0x5e, 0xa8, 0xe5, 0x9b, 0xbd);
mi.position = 500020001;
mi.flags = CMIF_UNICODE;
- mi.hIcolibItem = icon.hIcolib;
+ mi.hIcolibItem = icon[0].hIcolib;
mi.name.w = LPGENW("&Add contact...");
mi.pszService = MS_ADDCONTACTPLUS_SHOW;
hMainMenuItem = Menu_AddMainMenuItem(&mi);
@@ -108,7 +111,7 @@ static int CreateButton(WPARAM, LPARAM) tbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
tbb.pszService = MS_ADDCONTACTPLUS_SHOW;
tbb.name = tbb.pszTooltipUp = LPGEN("Add contact");
- tbb.hIconHandleUp = icon.hIcolib;
+ tbb.hIconHandleUp = icon[0].hIcolib;
hToolBarItem = TopToolbar_AddButton(&tbb);
return 0;
}
@@ -138,7 +141,7 @@ extern "C" int __declspec(dllexport) Load(void) INITCOMMONCONTROLSEX icex = { sizeof(icex), ICC_USEREX_CLASSES };
InitCommonControlsEx(&icex);
- Icon_Register(g_plugin.getInst(), LPGEN("AddContact+"), &icon, 1);
+ g_plugin.registerIcon(LPGEN("AddContact+"), icon);
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccListChanged);
|