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 --- protocols/Sametime/src/conference.cpp | 16 +++------------- protocols/Sametime/src/sametime_proto.cpp | 1 - protocols/Sametime/src/sametime_proto.h | 4 +--- 3 files changed, 4 insertions(+), 17 deletions(-) (limited to 'protocols/Sametime/src') diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index 6b2e6818c5..697a829421 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -438,9 +438,8 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = (MCONTACT)wParam; debugLog(_T("CSametimeProto::PrebuildContactMenu() hContact=[%x]"), hContact); - CLISTMENUITEM mi = { 0 }; - mi.flags = CMIM_FLAGS | (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 1 ? 0 : CMIF_HIDDEN); - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hLeaveChatMenuItem, (LPARAM)&mi); + + Menu_ShowItem(hLeaveChatMenuItem, db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 1); // if user is already in our meeting, bool not_present = true; @@ -460,9 +459,8 @@ int CSametimeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) db_free(&dbv); } - mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0 && not_present ? 0 : CMIF_HIDDEN); - CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hCreateChatMenuItem, (LPARAM)&mi); + Menu_ShowItem(hCreateChatMenuItem, db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0 && not_present); return 0; } @@ -530,11 +528,3 @@ void CSametimeProto::InitConferenceMenu() HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSametimeProto::PrebuildContactMenu); } - -void CSametimeProto::DeinitConferenceMenu() -{ - debugLog(_T("CSametimeProto::DeinitConferenceMenu()")); - CallService(MO_REMOVEMENUITEM, (WPARAM)hLeaveChatMenuItem, 0); - CallService(MO_REMOVEMENUITEM, (WPARAM)hCreateChatMenuItem, 0); -} - diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 9003bfbe21..2aaab309e0 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -66,7 +66,6 @@ CSametimeProto::~CSametimeProto() debugLog(_T("CSametimeProto::~CSametimeProto() start")); DeinitSessionMenu(); - DeinitConferenceMenu(); DeinitAwayMsg(); UnregisterPopups(); diff --git a/protocols/Sametime/src/sametime_proto.h b/protocols/Sametime/src/sametime_proto.h index b3690b29ee..4f3a249cf3 100644 --- a/protocols/Sametime/src/sametime_proto.h +++ b/protocols/Sametime/src/sametime_proto.h @@ -99,7 +99,6 @@ struct CSametimeProto : public PROTO void InitConference(); void InitConferenceMenu(); void DeinitConference(); - void DeinitConferenceMenu(); void ClearInviteQueue(); void TerminateConference(char* name); int __cdecl GcEventHook(WPARAM wParam, LPARAM lParam); @@ -183,8 +182,7 @@ struct CSametimeProto : public PROTO mwServiceConference* service_conference; mwLoginInfo* my_login_info; mwConference* my_conference; - HANDLE hLeaveChatMenuItem; - HANDLE hCreateChatMenuItem; + HGENMENU hLeaveChatMenuItem, hCreateChatMenuItem; // options.cpp SametimeOptions options; -- cgit v1.2.3