summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 14:21:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 14:21:33 +0300
commiteccbb5307a048e70ac4adb0d3fd333be28245fa8 (patch)
treea9a2c92c13391a5cf288c9e0d841833c54f3cd5e /protocols
parent6a9e3738066370dac38f5f6768b8a6f61fe709e0 (diff)
massive cleanup of useless cbSize fields
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/src/json.cpp3
-rw-r--r--protocols/FacebookRM/src/proto.cpp1
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
-rw-r--r--protocols/MSN/src/msn_misc.cpp7
-rw-r--r--protocols/MSN/src/msn_proto.h6
-rw-r--r--protocols/MSN/src/msn_svcs.cpp32
-rw-r--r--protocols/Omegle/src/communication.cpp2
-rw-r--r--protocols/VKontakte/src/misc.cpp1
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp10
-rw-r--r--protocols/WhatsApp/src/utils.cpp1
11 files changed, 4 insertions, 63 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index 2491db2d94..3c1602d593 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -836,10 +836,7 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo
if (st_.as_int() == 1) {
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
-
mir_snwprintf(st.tszText, TranslateT("%s is typing a message..."), name);
-
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st);
}
else CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact);
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 62adf63216..8cc10e531d 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -1146,7 +1146,6 @@ void FacebookProto::MessageRead(MCONTACT hContact)
wcsftime(ttime, _countof(ttime), L"%X", localtime(&time));
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("read"));
if (isChatRoom(hContact)) {
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index bdded58115..5af6eaa2b9 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -926,7 +926,7 @@ void CJabberProto::MenuUpdateSrmmIcon(JABBER_LIST_ITEM *item)
if (!hContact)
return;
- StatusIconData sid = { sizeof(sid) };
+ StatusIconData sid = {};
sid.szModule = m_szModuleName;
sid.flags = item->arResources.getCount() ? 0 : MBF_DISABLED;
Srmm_ModifyIcon(hContact, &sid);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 19813ac138..8960a70166 100755
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -216,7 +216,7 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM)
HookProtoEvent(ME_GC_EVENT, &CJabberProto::JabberGcEventHook);
HookProtoEvent(ME_GC_BUILDMENU, &CJabberProto::JabberGcMenuHook);
- StatusIconData sid = { sizeof(sid) };
+ StatusIconData sid = {};
sid.szModule = m_szModuleName;
sid.hIcon = LoadIconEx("main");
sid.flags = MBF_HIDDEN;
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<CMsnProto>
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<CMsnProto>
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
diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp
index 827560e378..527a42705f 100644
--- a/protocols/Omegle/src/communication.cpp
+++ b/protocols/Omegle/src/communication.cpp
@@ -553,7 +553,6 @@ bool Omegle_client::events()
SkinPlaySound("StrangerTyp");
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_on"));
ptrW who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_wstrdup(L"Stranger"));
@@ -566,7 +565,6 @@ bool Omegle_client::events()
SkinPlaySound("StrangerTypStop");
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
st.hIcon = IcoLib_GetIconByHandle(GetIconHandle("typing_off"));
ptrW who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_wstrdup(L"Stranger"));
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 3ae47bcf21..975e3c141a 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -737,7 +737,6 @@ void CVkProto::SetSrmmReadStatus(MCONTACT hContact)
_free_locale(locale);
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
st.hIcon = IcoLib_GetIconByHandle(GetIconHandle(IDI_READMSG));
mir_snwprintf(st.tszText, TranslateT("Message read: %s"), ttime);
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 484602e265..725e48d25f 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -842,9 +842,7 @@ void CVkProto::ChatContactTypingThread(void *p)
m_ChatsTyping.insert(param);
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
mir_snwprintf(st.tszText, TranslateT("%s is typing a message..."), cu->m_wszNick);
-
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st);
}
@@ -874,18 +872,10 @@ void CVkProto::StopChatContactTyping(int iChatId, int iUserId)
m_ChatsTyping.remove(cp);
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
mir_snwprintf(st.tszText, L" ");
-
- // CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, NULL) clears statusbar very slowly.
- // (1-10 sec(!!!) for me on tabSRMM O_o)
- // So I call MS_MSG_SETSTATUSTEXT with st.wszText = " " for cleaning of "... is typing a message..." string.
- // It works instantly!
-
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st);
// After that I call standard cleaning procedure:
-
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact);
}
}
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp
index c131dda0f8..c0bfdfc558 100644
--- a/protocols/WhatsApp/src/utils.cpp
+++ b/protocols/WhatsApp/src/utils.cpp
@@ -49,7 +49,6 @@ void utils::setStatusMessage(MCONTACT hContact, const wchar_t *ptszMessage)
{
if (ptszMessage != NULL) {
StatusTextData st = { 0 };
- st.cbSize = sizeof(st);
st.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
wcsncpy_s(st.tszText, ptszMessage, _TRUNCATE);
CallService(MS_MSG_SETSTATUSTEXT, hContact, (LPARAM)&st);