From eccbb5307a048e70ac4adb0d3fd333be28245fa8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 28 Mar 2017 14:21:33 +0300 Subject: massive cleanup of useless cbSize fields --- protocols/MSN/src/msn_misc.cpp | 7 ++----- protocols/MSN/src/msn_proto.h | 6 ------ protocols/MSN/src/msn_svcs.cpp | 32 -------------------------------- 3 files changed, 2 insertions(+), 43 deletions(-) (limited to 'protocols/MSN/src') diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 615524ec03..637ef68518 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -1308,11 +1308,8 @@ bool CMsnProto::MSN_IsMeByContact(MCONTACT hContact, char* szEmail) bool MSN_MsgWndExist(MCONTACT hContact) { - MessageWindowInputData msgWinInData = - { sizeof(MessageWindowInputData), hContact, MSG_WINDOW_UFLAG_MSG_BOTH }; - MessageWindowData msgWinData = { 0 }; - msgWinData.cbSize = sizeof(MessageWindowData); - + MessageWindowData msgWinData = {}; + MessageWindowInputData msgWinInData = { hContact, MSG_WINDOW_UFLAG_MSG_BOTH }; bool res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0; res = res || msgWinData.hwndWindow; if (res) { diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h index e210889035..9aeb60b56b 100644 --- a/protocols/MSN/src/msn_proto.h +++ b/protocols/MSN/src/msn_proto.h @@ -88,8 +88,6 @@ struct CMsnProto : public PROTO INT_PTR __cdecl GetUnreadEmailCount(WPARAM wParam, LPARAM lParam); - INT_PTR __cdecl ManageAccount(WPARAM wParam, LPARAM lParam); - INT_PTR __cdecl OnLeaveChat(WPARAM wParam, LPARAM lParam); //====| Events |====================================================================== @@ -102,10 +100,6 @@ struct CMsnProto : public PROTO int __cdecl OnPreShutdown(WPARAM wParam,LPARAM lParam); int __cdecl OnContactDoubleClicked(WPARAM wParam,LPARAM lParam); int __cdecl OnDbSettingChanged(WPARAM wParam,LPARAM lParam); - int __cdecl OnUserInfoInit(WPARAM wParam,LPARAM lParam); -#ifdef OBSOLETE - int __cdecl OnWindowEvent(WPARAM wParam, LPARAM lParam); -#endif int __cdecl OnWindowPopup(WPARAM wParam, LPARAM lParam); //====| Data |======================================================================== diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 76eeb339ac..b0be81b0f1 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -523,38 +523,6 @@ int CMsnProto::OnIdleChanged(WPARAM, LPARAM lParam) return 0; } -#ifdef OBSOLETE -///////////////////////////////////////////////////////////////////////////////////////// -// OnWindowEvent - creates session on window open - -int CMsnProto::OnWindowEvent(WPARAM, LPARAM lParam) -{ - MessageWindowEventData* msgEvData = (MessageWindowEventData*)lParam; - - if (msgEvData->uType == MSG_WINDOW_EVT_OPENING) { - if (m_iStatus == ID_STATUS_OFFLINE || m_iStatus == ID_STATUS_INVISIBLE) - return 0; - - if (!MSN_IsMyContact(msgEvData->hContact)) return 0; - - char tEmail[MSN_MAX_EMAIL_LEN]; - if (MSN_IsMeByContact(msgEvData->hContact, tEmail)) return 0; - - int netId = Lists_GetNetId(tEmail); - if (netId != NETID_MSN && netId != NETID_LCS) return 0; - - if (Lists_IsInList(LIST_BL, tEmail)) return 0; - - bool isOffline; - ThreadData* thread = MSN_StartSB(tEmail, isOffline); - - if (thread == NULL && !isOffline) - MsgQueue_Add(tEmail, 'X', NULL, 0); - } - return 0; -} -#endif - ///////////////////////////////////////////////////////////////////////////////////////// // OnWindowEvent - creates session on window open -- cgit v1.2.3