From bd820972afe24409e6b570adbc45f5dc0fa2385d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 11 Apr 2013 07:08:40 +0000 Subject: SRMM icons to be unloaded automatically git-svn-id: http://svn.miranda-ng.org/main/trunk@4418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FavContacts/src/main.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'plugins/FavContacts') diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index 3abcf07a58..6f8d797111 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -144,18 +144,15 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam) { HookEvent(ME_TTB_MODULELOADED, ProcessTBLoaded); - if (ServiceExists(MS_MSG_ADDICON)) { - StatusIconData sid = {0}; - sid.cbSize = sizeof(sid); - sid.szModule = "FavContacts"; - sid.szTooltip = "Favourite Contacts"; - sid.hIcon = Skin_GetIconByHandle(iconList[0].hIcolib); - sid.hIconDisabled = Skin_GetIconByHandle(iconList[1].hIcolib); - CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid); - - HookEvent(ME_MSG_ICONPRESSED, ProcessSrmmIconClick); - HookEvent(ME_MSG_WINDOWEVENT, ProcessSrmmEvent); - } + StatusIconData sid = { sizeof(sid) }; + sid.szModule = "FavContacts"; + sid.szTooltip = "Favourite Contacts"; + sid.hIcon = Skin_GetIconByHandle(iconList[0].hIcolib); + sid.hIconDisabled = Skin_GetIconByHandle(iconList[1].hIcolib); + Srmm_AddIcon(&sid); + + HookEvent(ME_MSG_ICONPRESSED, ProcessSrmmIconClick); + HookEvent(ME_MSG_WINDOWEVENT, ProcessSrmmEvent); ///////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3