summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/icq_firstrun.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-11-19 18:01:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-11-19 18:01:14 +0000
commitd6e05cc3bca53565d9ca65377ab8b0b6190774b3 (patch)
tree76040facd4d0b82162069a19cae8f7f024bf1f65 /protocols/IcqOscarJ/src/icq_firstrun.cpp
parent2ef414538760079fa2955fca1a2c03d610459fa8 (diff)
preparing to the transparent cyphering: end of MS_DB_CRYPT_ENCODESTRING/MS_DB_CRYPT_DECODESTRING
git-svn-id: http://svn.miranda-ng.org/main/trunk@6938 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_firstrun.cpp')
-rw-r--r--protocols/IcqOscarJ/src/icq_firstrun.cpp53
1 files changed, 22 insertions, 31 deletions
diff --git a/protocols/IcqOscarJ/src/icq_firstrun.cpp b/protocols/IcqOscarJ/src/icq_firstrun.cpp
index 9a5d6bbe11..47dd485da1 100644
--- a/protocols/IcqOscarJ/src/icq_firstrun.cpp
+++ b/protocols/IcqOscarJ/src/icq_firstrun.cpp
@@ -29,13 +29,11 @@
// -----------------------------------------------------------------------------
#include "icqoscar.h"
-
static void accountLoadDetails(CIcqProto *ppro, HWND hwndDlg)
{
char pszUIN[20];
DWORD dwUIN = ppro->getContactUin(NULL);
- if (dwUIN)
- {
+ if (dwUIN) {
mir_snprintf(pszUIN, 20, "%u", dwUIN);
SetDlgItemTextA(hwndDlg, IDC_UIN, pszUIN);
}
@@ -45,7 +43,6 @@ static void accountLoadDetails(CIcqProto *ppro, HWND hwndDlg)
SetDlgItemTextA(hwndDlg, IDC_PW, pszPwd);
}
-
INT_PTR CALLBACK icq_FirstRunDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
CIcqProto* ppro = (CIcqProto*)GetWindowLongPtr( hwndDlg, GWLP_USERDATA );
@@ -75,48 +72,42 @@ INT_PTR CALLBACK icq_FirstRunDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
break;
case WM_COMMAND:
- switch (LOWORD(wParam))
- {
+ switch (LOWORD(wParam)) {
case IDC_REGISTER:
CallService(MS_UTILS_OPENURL, 1, (LPARAM)URL_REGISTER);
break;
- case IDC_UIN:
- case IDC_PW:
- if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus())
- {
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ case IDC_UIN:
+ case IDC_PW:
+ if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) {
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
- }
- break;
+ }
+ break;
case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->code)
- {
+ switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- {
- char str[128];
- GetDlgItemTextA(hwndDlg, IDC_UIN, str, sizeof(str));
- ppro->setDword(UNIQUEIDSETTING, atoi(str));
- GetDlgItemTextA(hwndDlg, IDC_PW, str, sizeof(ppro->m_szPassword));
- strcpy(ppro->m_szPassword, str);
- CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(ppro->m_szPassword), (LPARAM) str);
- ppro->setString("Password", str);
- }
- break;
-
- case PSN_RESET:
- accountLoadDetails(ppro, hwndDlg);
- break;
- }
+ char str[128];
+ GetDlgItemTextA(hwndDlg, IDC_UIN, str, sizeof(str));
+ ppro->setDword(UNIQUEIDSETTING, atoi(str));
+
+ GetDlgItemTextA(hwndDlg, IDC_PW, str, sizeof(ppro->m_szPassword));
+ strcpy(ppro->m_szPassword, str);
+ ppro->setString("Password", str);
+ break;
+
+ case PSN_RESET:
+ accountLoadDetails(ppro, hwndDlg);
+ break;
+ }
break;
}
return FALSE;
}
-
INT_PTR CIcqProto::OnCreateAccMgrUI(WPARAM wParam, LPARAM lParam)
{
return (INT_PTR)CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ICQACCOUNT), (HWND)lParam, icq_FirstRunDlgProc, LPARAM(this));