summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewXstatusNotify/src/main.cpp')
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 66163f6b72..fafec319e8 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -1062,18 +1062,11 @@ INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM)
{
db_set_b(0, MODULE, "TempDisable", opt.TempDisabled = !opt.TempDisabled);
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
- if (opt.TempDisabled) {
- mi.ptszName = LPGENT("Enable status notification");
- mi.icolibItem = GetIconHandle(ICO_NOTIFICATION_OFF);
- }
- else {
- mi.ptszName = LPGENT("Disable status notification");
- mi.icolibItem = GetIconHandle(ICO_NOTIFICATION_ON);
- }
+ if (opt.TempDisabled)
+ Menu_ModifyItem(hEnableDisableMenu, LPGENT("Enable status notification"), GetIconHandle(ICO_NOTIFICATION_OFF));
+ else
+ Menu_ModifyItem(hEnableDisableMenu, LPGENT("Disable status notification"), GetIconHandle(ICO_NOTIFICATION_ON));
- Menu_ModifyItem(hEnableDisableMenu, &mi);
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hToolbarButton, opt.TempDisabled ? 0 : TTBST_PUSHED);
return 0;
}