diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-11 07:08:40 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-11 07:08:40 +0000 |
commit | bd820972afe24409e6b570adbc45f5dc0fa2385d (patch) | |
tree | e600bf39409083219c7928e10ec2b61002529641 /plugins/FavContacts/src/main.cpp | |
parent | 6029165c364f93a84ab7e98ef71d3a711b0f588c (diff) |
SRMM icons to be unloaded automatically
git-svn-id: http://svn.miranda-ng.org/main/trunk@4418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FavContacts/src/main.cpp')
-rw-r--r-- | plugins/FavContacts/src/main.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
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);
/////////////////////////////////////////////////////////////////////////////////////
|