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/NoHistory/src/dllmain.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/NoHistory/src') 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; -- cgit v1.2.3