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/BuddyExpectator/src/BuddyExpectator.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'plugins/BuddyExpectator/src') diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index be0812a19e..fa71165748 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -438,17 +438,11 @@ int onPrebuildContactMenu(WPARAM hContact, LPARAM) if (!proto) return 0; - CLISTMENUITEM mi = { 0 }; - mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR; - if (db_get_b(hContact, MODULE_NAME, "MissYou", 0)) { - mi.ptszName = LPGENT("Disable Miss You"); - mi.icolibItem = iconList[1].hIcolib; - } - else { - mi.ptszName = LPGENT("Enable Miss You"); - mi.icolibItem = iconList[2].hIcolib; - } - Menu_ModifyItem(hContactMenu, &mi); + if (db_get_b(hContact, MODULE_NAME, "MissYou", 0)) + Menu_ModifyItem(hContactMenu, LPGENT("Disable Miss You"), iconList[1].hIcolib); + else + Menu_ModifyItem(hContactMenu, LPGENT("Enable Miss You"), iconList[2].hIcolib); + Menu_ShowItem(hContactMenu, !db_get_b(hContact, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)); return 0; } -- cgit v1.2.3