From cb4d31922f0690f5a3c79526245c963bfd118864 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 May 2018 21:56:03 +0300 Subject: Icon_Register(g_plugin.getInst() => g_plugin.registerIcon Icon_RegisterT(g_plugin.getInst() => g_plugin.registerIconW --- plugins/AddContactPlus/src/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/AddContactPlus/src/main.cpp') 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); -- cgit v1.2.3