From 4b00a811ae7e3678578b04e6811265076f9404d9 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Fri, 7 Mar 2014 21:50:21 +0000 Subject: MRA + Add: Send E-Mail to contact - Del: mail.ru blog service * Change: web authorization via https * Fix: contact services: auth request, auth grang, send post card * Fix: net error handle (after prev commit) git-svn-id: http://svn.miranda-ng.org/main/trunk@8466 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/Mra_functions.cpp | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'protocols/MRA/src/Mra_functions.cpp') diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 56d22b66a5..427ddfe46d 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1038,18 +1038,8 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP break; case WM_DESTROY: + SetWindowLongPtr(hWndDlg, GWLP_USERDATA, 0); if (dat) { // set our xStatus - SetWindowLongPtr(hWndDlg, GWLP_USERDATA, 0); - - HWND hWndEdit = GetDlgItem(hWndDlg, IDC_XTITLE); - WNDPROC OldMessageEditProc = (WNDPROC)GetWindowLongPtr(hWndEdit, GWLP_USERDATA); - SetWindowLongPtr(hWndEdit, GWLP_WNDPROC, (LONG_PTR)OldMessageEditProc); - SetWindowLongPtr(hWndEdit, GWLP_USERDATA, 0); - - hWndEdit = GetDlgItem(hWndDlg, IDC_XMSG); - OldMessageEditProc = (WNDPROC)GetWindowLongPtr(hWndEdit, GWLP_USERDATA); - SetWindowLongPtr(hWndEdit, GWLP_WNDPROC, (LONG_PTR)OldMessageEditProc); - SetWindowLongPtr(hWndEdit, GWLP_USERDATA, 0); TCHAR szBuff[STATUS_TITLE_MAX + STATUS_DESC_MAX]; DWORD dwBuffSize = GetDlgItemText(hWndDlg, IDC_XMSG, szBuff, STATUS_DESC_MAX + 1); @@ -1113,8 +1103,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w SetWindowLongPtr(hWndDlg, GWLP_USERDATA, (LONG_PTR)dat); HWND hWndEdit = GetDlgItem(hWndDlg, IDC_MSG_TO_SEND); - WNDPROC OldMessageEditProc = (WNDPROC)SetWindowLongPtr(hWndEdit, GWLP_WNDPROC, (LONG_PTR)MessageEditSubclassProc); - SetWindowLongPtr(hWndEdit, GWLP_USERDATA, (LONG_PTR)OldMessageEditProc); + mir_subclassWindow(GetDlgItem(hWndDlg, IDC_MSG_TO_SEND), MessageEditSubclassProc); SendMessage(hWndEdit, EM_LIMITTEXT, MICBLOG_STATUS_MAX, 0); SendMessage(hWndDlg, WM_SETICON, ICON_BIG, (LPARAM)IconLibGetIcon(gdiMenuItems[5].hIcolib)); @@ -1191,15 +1180,8 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w break; case WM_DESTROY: - if (dat) { - SetWindowLongPtr(hWndDlg, GWLP_USERDATA, (LONG_PTR)0); - - HWND hWndEdit = GetDlgItem(hWndDlg, IDC_MSG_TO_SEND); - WNDPROC OldMessageEditProc = (WNDPROC)GetWindowLongPtr(hWndEdit, GWLP_USERDATA); - SetWindowLongPtr(hWndEdit, GWLP_WNDPROC, (LONG_PTR)OldMessageEditProc); - SetWindowLongPtr(hWndEdit, GWLP_USERDATA, (LONG_PTR)0); - mir_free(dat); - } + SetWindowLongPtr(hWndDlg, GWLP_USERDATA, (LONG_PTR)0); + mir_free(dat); EndDialog(hWndDlg, NO_ERROR); break; } -- cgit v1.2.3