summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Mra_functions.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-03-07 21:50:21 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-03-07 21:50:21 +0000
commit4b00a811ae7e3678578b04e6811265076f9404d9 (patch)
treeaec31fae331b9e4c4543433ed4bdd3fc2300fd0e /protocols/MRA/src/Mra_functions.cpp
parent5e54cbba072d17eb0f3d0fea9a14f048a3f2ab84 (diff)
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
Diffstat (limited to 'protocols/MRA/src/Mra_functions.cpp')
-rw-r--r--protocols/MRA/src/Mra_functions.cpp26
1 files changed, 4 insertions, 22 deletions
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;
}