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/NoHistory/src/dllmain.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/NoHistory/src/dllmain.cpp')
-rw-r--r-- | plugins/NoHistory/src/dllmain.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
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)
|