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/NoHistory/src/dllmain.cpp | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) (limited to 'plugins/NoHistory/src/dllmain.cpp') diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index 1d8caa5cd8..0e7193c9b3 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -239,27 +239,22 @@ int IconPressed(WPARAM wParam, LPARAM lParam) // add icon to srmm status icons void SrmmMenu_Load() { - if ( ServiceExists(MS_MSG_ADDICON)) { - StatusIconData sid = { sizeof(sid) }; - sid.szModule = MODULE; - sid.flags = 0; - sid.dwId = 0; - - sid.szTooltip = Translate("History Enabled"); - sid.hIcon = sid.hIconDisabled = hIconKeep; - - CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid); + StatusIconData sid = { sizeof(sid) }; + sid.szModule = MODULE; - sid.dwId = 1; - sid.szTooltip = Translate("History Disabled"); - sid.hIcon = sid.hIconDisabled = hIconRemove; - CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid); + sid.dwId = 0; + sid.szTooltip = Translate("History Enabled"); + sid.hIcon = sid.hIconDisabled = hIconKeep; + Srmm_AddIcon(&sid); + sid.dwId = 1; + sid.szTooltip = Translate("History Disabled"); + sid.hIcon = sid.hIconDisabled = hIconRemove; + Srmm_AddIcon(&sid); - // hook the window events so that we can can change the status of the icon - HookEvent(ME_MSG_WINDOWEVENT, WindowEvent); - HookEvent(ME_MSG_ICONPRESSED, IconPressed); - } + // hook the window events so that we can can change the status of the icon + HookEvent(ME_MSG_WINDOWEVENT, WindowEvent); + HookEvent(ME_MSG_ICONPRESSED, IconPressed); } int ModulesLoaded(WPARAM wParam, LPARAM lParam) -- cgit v1.2.3