From 3ffc894a7a132a013e74fe063b72d79e17c998dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 28 Mar 2017 15:12:27 +0300 Subject: we don't need the uFlags field either --- plugins/Dropbox/src/dropbox_utils.cpp | 2 +- plugins/KeyboardNotify/src/main.cpp | 2 +- plugins/MirLua/src/m_message.cpp | 2 +- plugins/Scriver/src/msgs.cpp | 3 --- plugins/Sessions/Src/Main.cpp | 1 - plugins/TabSRMM/src/msgs.cpp | 11 ----------- 6 files changed, 3 insertions(+), 18 deletions(-) (limited to 'plugins') diff --git a/plugins/Dropbox/src/dropbox_utils.cpp b/plugins/Dropbox/src/dropbox_utils.cpp index 4872e917f4..3aacbc9267 100644 --- a/plugins/Dropbox/src/dropbox_utils.cpp +++ b/plugins/Dropbox/src/dropbox_utils.cpp @@ -116,7 +116,7 @@ void CDropbox::SendToContact(MCONTACT hContact, const wchar_t *data) void CDropbox::PasteToInputArea(MCONTACT hContact, const wchar_t *data) { - MessageWindowData mwd = { sizeof(MessageWindowData) }; + MessageWindowData mwd; if (!CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&mwd)) { HWND hEdit = GetDlgItem(mwd.hwndWindow, 1002 /*IDC_MESSAGE*/); if (!hEdit) hEdit = GetDlgItem(mwd.hwndWindow, 1009 /*IDC_CHATMESSAGE*/); diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 277ae0e0f4..4aad0b4575 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -842,7 +842,7 @@ void createEventPrefix(wchar_t *prefixName, size_t maxLen) BOOL CheckMsgWnd(MCONTACT hContact, BOOL *focus) { if (hContact) { - MessageWindowData mwd = { sizeof(MessageWindowData) }; + MessageWindowData mwd; if (!CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&mwd) && mwd.hwndWindow) { *focus = mwd.uState & MSG_WINDOW_STATE_FOCUS; return TRUE; diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp index c21d71335c..a7f4be9729 100644 --- a/plugins/MirLua/src/m_message.cpp +++ b/plugins/MirLua/src/m_message.cpp @@ -5,7 +5,7 @@ static int message_Paste(lua_State *L) MCONTACT hContact = luaL_checkinteger(L, 1); ptrW text(mir_utf8decodeW(luaL_checkstring(L, 2))); - MessageWindowData mwd = { sizeof(MessageWindowData) }; + MessageWindowData mwd; INT_PTR res = CallService(MS_MSG_GETWINDOWDATA, hContact, (LPARAM)&mwd); lua_pushinteger(L, res); if (res) diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index b0c52cad36..7f15fcaff5 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -293,9 +293,6 @@ static INT_PTR GetWindowData(WPARAM hContact, LPARAM lParam) return 1; HWND hwnd = WindowList_Find(pci->hWindowList, hContact); - if (hwnd == nullptr) - hwnd = SM_FindWindowByContact(hContact); - mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; mwd->hwndWindow = hwnd; mwd->local = 0; mwd->uState = SendMessage(hwnd, DM_GETWINDOWSTATE, 0, 0); diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 93955d9011..7e0d69efaf 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -396,7 +396,6 @@ INT_PTR CloseCurrentSession(WPARAM, LPARAM) { while (session_list[0] != 0) { MessageWindowData mwd; - mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; CallService(MS_MSG_GETWINDOWDATA, session_list[0], (LPARAM)&mwd); SendMessage(mwd.hwndWindow, WM_CLOSE, 0, 0); } diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 136c85e07d..edc495cc93 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -75,7 +75,6 @@ static INT_PTR GetWindowData(WPARAM hContact, LPARAM lParam) HWND hwnd = M.FindWindow(hContact); if (hwnd) { - mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; mwd->hwndWindow = hwnd; mwd->local = GetParent(GetParent(hwnd)); SendMessage(hwnd, DM_GETWINDOWSTATE, 0, 0); @@ -83,16 +82,6 @@ static INT_PTR GetWindowData(WPARAM hContact, LPARAM lParam) return 0; } - SESSION_INFO *si = SM_FindSessionByHCONTACT(hContact); - if (si != nullptr && si->pDlg != nullptr) { - mwd->uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; - mwd->hwndWindow = si->pDlg->GetHwnd(); - mwd->local = GetParent(GetParent(si->pDlg->GetHwnd())); - SendMessage(si->pDlg->GetHwnd(), DM_GETWINDOWSTATE, 0, 0); - mwd->uState = GetWindowLongPtr(si->pDlg->GetHwnd(), DWLP_MSGRESULT); - return 0; - } - memset(mwd, 0, sizeof(*mwd)); return 1; } -- cgit v1.2.3