summaryrefslogtreecommitdiff
path: root/plugins/YAPP/src/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/YAPP/src/services.cpp')
-rw-r--r--plugins/YAPP/src/services.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp
index 4132c98e32..c314328c05 100644
--- a/plugins/YAPP/src/services.cpp
+++ b/plugins/YAPP/src/services.cpp
@@ -195,14 +195,14 @@ void UpdateMenu()
{
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
- CLISTMENUITEM mi = { 0 };
- mi.ptszName = (isEnabled ? LPGENT("Disable Popups") : LPGENT("Enable Popups"));
- mi.hIcon = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
- mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
- Menu_ModifyItem(hMenuItem, &mi);
-
- mi.flags = CMIM_ICON;
- Menu_ModifyItem(hMenuRoot, &mi);
+ if (isEnabled) {
+ Menu_ModifyItem(hMenuItem, LPGENT("Disable Popups"), IcoLib_GetIcon(ICO_POPUP_ON));
+ Menu_ModifyItem(hMenuRoot, NULL, IcoLib_GetIcon(ICO_POPUP_ON));
+ }
+ else {
+ Menu_ModifyItem(hMenuItem, LPGENT("Enable Popups"), IcoLib_GetIcon(ICO_POPUP_OFF));
+ Menu_ModifyItem(hMenuRoot, NULL, IcoLib_GetIcon(ICO_POPUP_OFF));
+ }
if (hTTButton)
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)hTTButton, isEnabled ? TTBST_PUSHED : 0);