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 --- plugins/Sessions/Src/Main.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'plugins/Sessions/Src') diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index ba1cbaf64d..7a813390f3 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -41,7 +41,7 @@ bool g_bIncompletedSave; HWND g_hDlg; HWND g_hSDlg; bool DONT = false; -bool StartUp, isLastTRUE = false, g_mode, bSC = false; +bool StartUp, isLastTRUE = false, bSC = false; MCONTACT session_list[255] = { 0 }; MCONTACT user_session_list[255] = { 0 }; @@ -394,25 +394,17 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM) INT_PTR CloseCurrentSession(WPARAM, LPARAM) { - HWND hWnd; MessageWindowInputData mwid; MessageWindowData mwd; while (session_list[0] != 0) { - mwid.cbSize = sizeof(MessageWindowInputData); mwid.hContact = session_list[0]; mwid.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; - mwd.cbSize = sizeof(MessageWindowData); mwd.hContact = mwid.hContact; mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&mwid, (LPARAM)&mwd); - - if (g_mode) { - hWnd = GetAncestor(mwd.hwndWindow, GA_ROOT); - SendMessage(hWnd, WM_CLOSE, 0, 1); - } - else SendMessage(mwd.hwndWindow, WM_CLOSE, 0, 0); + SendMessage(mwd.hwndWindow, WM_CLOSE, 0, 0); } memset(session_list, 0, sizeof(session_list)); return 0; @@ -685,7 +677,6 @@ static int OnSrmmWindowEvent(WPARAM, LPARAM lParam) { MessageWindowEventData *MWeventdata = (MessageWindowEventData*)lParam; if (MWeventdata->uType == MSG_WINDOW_EVT_OPEN) { - if (strstr(MWeventdata->szModule, "tabSRMsg")) g_mode = 1; AddToCurSession(MWeventdata->hContact, 0); if (g_bCrashRecovery) db_set_b(MWeventdata->hContact, MODNAME, "wasInLastSession", 1); -- cgit v1.2.3