summaryrefslogtreecommitdiff
path: root/plugins/NoHistory/src/dllmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NoHistory/src/dllmain.cpp')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp31
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)