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/NewEventNotify/src/menuitem.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'plugins/NewEventNotify/src') diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp index 9ab896ed7a..0aa91b51f7 100644 --- a/plugins/NewEventNotify/src/menuitem.cpp +++ b/plugins/NewEventNotify/src/menuitem.cpp @@ -39,17 +39,10 @@ static INT_PTR MenuitemNotifyCmd(WPARAM wParam,LPARAM lParam) int MenuitemUpdate(BOOL bStatus) { - CLISTMENUITEM mi = { 0 }; - if (bStatus) { - mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED)); - mi.pszName = MENUITEM_DISABLE; - } else { - mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_DISABLED)); - mi.pszName = MENUITEM_ENABLE; - } - mi.flags = CMIM_ICON | CMIM_NAME; - Menu_ModifyItem(hMenuitemNotify, &mi); - + if (bStatus) + Menu_ModifyItem(hMenuitemNotify, _T(MENUITEM_DISABLE), LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED))); + else + Menu_ModifyItem(hMenuitemNotify, _T(MENUITEM_ENABLE), LoadIcon(hInst, MAKEINTRESOURCE(IDI_DISABLED))); return 0; } @@ -67,6 +60,5 @@ int MenuitemInit(BOOL bStatus) bNotify = bStatus; MenuitemUpdate(bNotify); - return 0; } -- cgit v1.2.3