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 /protocols/Sametime | |
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 'protocols/Sametime')
-rw-r--r-- | protocols/Sametime/src/conference.cpp | 16 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime_proto.cpp | 1 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime_proto.h | 4 |
3 files changed, 4 insertions, 17 deletions
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<CSametimeProto> 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<CSametimeProto> mwServiceConference* service_conference;
mwLoginInfo* my_login_info;
mwConference* my_conference;
- HANDLE hLeaveChatMenuItem;
- HANDLE hCreateChatMenuItem;
+ HGENMENU hLeaveChatMenuItem, hCreateChatMenuItem;
// options.cpp
SametimeOptions options;
|