diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-22 20:38:56 +0000 |
commit | 88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch) | |
tree | b3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /plugins/NewEventNotify/src/menuitem.cpp | |
parent | 9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (diff) |
Menu_ModifyItem unbound from CLISTMENUITEM structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@14334 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewEventNotify/src/menuitem.cpp')
-rw-r--r-- | plugins/NewEventNotify/src/menuitem.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
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;
}
|