summaryrefslogtreecommitdiff
path: root/plugins/BuddyExpectator
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-22 20:38:56 +0000
commit88790eed4ffd9ca555c8f9b73cb014a93b57a34f (patch)
treeb3e5bfe096005a9cac4bc14fdfbe5f6f5acad98a /plugins/BuddyExpectator
parent9ecc2aa50e2183e2c4a11861ca6dede7d2151139 (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/BuddyExpectator')
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp16
1 files changed, 5 insertions, 11 deletions
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;
}