diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-28 14:21:33 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-28 14:21:33 +0300 |
commit | eccbb5307a048e70ac4adb0d3fd333be28245fa8 (patch) | |
tree | a9a2c92c13391a5cf288c9e0d841833c54f3cd5e /plugins/Sessions/Src/Main.cpp | |
parent | 6a9e3738066370dac38f5f6768b8a6f61fe709e0 (diff) |
massive cleanup of useless cbSize fields
Diffstat (limited to 'plugins/Sessions/Src/Main.cpp')
-rw-r--r-- | plugins/Sessions/Src/Main.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
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);
|