From 914f4263b866f546311b4f8e3a95ff816770783f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 18 Aug 2015 11:47:58 +0000 Subject: - naming conflict; - warning fixes; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@14985 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MRA/src/Mra_options.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'protocols/MRA/src/Mra_options.cpp') diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp index 6edfcfb59e..909a1b94f9 100644 --- a/protocols/MRA/src/Mra_options.cpp +++ b/protocols/MRA/src/Mra_options.cpp @@ -3,17 +3,17 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { CMraProto *ppro = (CMraProto*)GetWindowLongPtr(hWndDlg, GWLP_USERDATA); - CMStringW szBuff; switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hWndDlg); SetWindowLongPtr(hWndDlg, GWLP_USERDATA, lParam); ppro = (CMraProto*)lParam; - - if (ppro->mraGetStringW(NULL, "e-mail", szBuff)) - SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str()); - + { + CMStringW szBuff; + if (ppro->mraGetStringW(NULL, "e-mail", szBuff)) + SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str()); + } SetDlgItemText(hWndDlg, IDC_PASSWORD, _T("")); return TRUE; @@ -54,17 +54,17 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARA INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { CMraProto *ppro = (CMraProto*)GetWindowLongPtr(hWndDlg, GWLP_USERDATA); - CMStringW szBuff; switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hWndDlg); SetWindowLongPtr(hWndDlg, GWLP_USERDATA, lParam); ppro = (CMraProto*)lParam; - - if (ppro->mraGetStringW(NULL, "e-mail", szBuff)) - SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str()); - + { + CMStringW szBuff; + if (ppro->mraGetStringW(NULL, "e-mail", szBuff)) + SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str()); + } SetDlgItemText(hWndDlg, IDC_PASSWORD, _T("")); return TRUE; @@ -104,18 +104,19 @@ INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lP INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { CMraProto *ppro = (CMraProto*)GetWindowLongPtr(hWndDlg, GWLP_USERDATA); - CMStringW szBuff; switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hWndDlg); SetWindowLongPtr(hWndDlg, GWLP_USERDATA, lParam); ppro = (CMraProto*)lParam; - - if (ppro->mraGetStringW(NULL, "Server", szBuff)) - SetDlgItemText(hWndDlg, IDC_SERVER, szBuff.c_str()); - else - SetDlgItemTextA(hWndDlg, IDC_SERVER, MRA_DEFAULT_SERVER); + { + CMStringW szBuff; + if (ppro->mraGetStringW(NULL, "Server", szBuff)) + SetDlgItemText(hWndDlg, IDC_SERVER, szBuff.c_str()); + else + SetDlgItemTextA(hWndDlg, IDC_SERVER, MRA_DEFAULT_SERVER); + } SetDlgItemInt(hWndDlg, IDC_SERVERPORT, ppro->getWord("ServerPort", MRA_DEFAULT_SERVER_PORT), FALSE); // if set SSL proxy, setting will ignored -- cgit v1.2.3