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/NoHistory | |
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/NoHistory')
-rw-r--r-- | plugins/NoHistory/src/dllmain.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index fe6d15fc5f..73a1d70c2a 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -146,15 +146,14 @@ int PrebuildContactMenu(WPARAM hContact, LPARAM lParam) char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIM_FLAGS | CMIF_TCHAR;
- if (chat_room) mi.flags |= CMIF_HIDDEN;
+ if (chat_room)
+ Menu_ShowItem(hMenuToggle, false);
else {
- mi.flags |= (CMIM_NAME | CMIM_ICON);
- mi.ptszName = (remove ? LPGENT("Enable History") : LPGENT("Disable History"));
- mi.hIcon = (remove ? hIconKeep : hIconRemove);
+ if (remove)
+ Menu_ModifyItem(hMenuToggle, LPGENT("Enable History"), hIconKeep);
+ else
+ Menu_ModifyItem(hMenuToggle, LPGENT("Disable History"), hIconRemove);
}
- Menu_ModifyItem(hMenuToggle, &mi);
Menu_ShowItem(hMenuClear, !chat_room && db_event_count(hContact) > 0);
return 0;
|