From 88790eed4ffd9ca555c8f9b73cb014a93b57a34f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 22 Jun 2015 20:38:56 +0000 Subject: Menu_ModifyItem unbound from CLISTMENUITEM structure git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/main.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'plugins/NewXstatusNotify') 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; } -- cgit v1.2.3