diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-27 20:15:24 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-27 20:15:24 +0000 |
commit | 93fa5c2dba54c059545429ebd8acc07c1084bec0 (patch) | |
tree | 12d36d7a0b9b6a2af689b7f675af9429fcf4699c /protocols/MRA/src/Mra_options.cpp | |
parent | f1e65ee68af73283b4b23c447ec2a4672dae4691 (diff) |
MRA xStatus icon #50 added: mobile
git-svn-id: http://svn.miranda-ng.org/main/trunk@7920 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA/src/Mra_options.cpp')
-rw-r--r-- | protocols/MRA/src/Mra_options.cpp | 52 |
1 files changed, 24 insertions, 28 deletions
diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp index 5fd6a27b67..52ffb2bbf1 100644 --- a/protocols/MRA/src/Mra_options.cpp +++ b/protocols/MRA/src/Mra_options.cpp @@ -11,7 +11,7 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARA SetWindowLongPtr(hWndDlg, GWLP_USERDATA, lParam);
ppro = (CMraProto*)lParam;
- if ( ppro->mraGetStringW(NULL, "e-mail", szBuff))
+ if (ppro->mraGetStringW(NULL, "e-mail", szBuff))
SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str());
SetDlgItemText(hWndDlg, IDC_PASSWORD, _T(""));
@@ -20,11 +20,11 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARA case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_NEW_ACCOUNT_LINK:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM) MRA_REGISTER_URL);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)MRA_REGISTER_URL);
return TRUE;
case IDC_LOOKUPLINK:
- CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM) MRA_FORGOT_PASSWORD_URL);
+ CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)MRA_FORGOT_PASSWORD_URL);
return TRUE;
}
if ((LOWORD(wParam) == IDC_LOGIN || LOWORD(wParam) == IDC_PASSWORD) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
@@ -62,7 +62,7 @@ INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lP SetWindowLongPtr(hWndDlg, GWLP_USERDATA, lParam);
ppro = (CMraProto*)lParam;
- if ( ppro->mraGetStringW(NULL, "e-mail", szBuff))
+ if (ppro->mraGetStringW(NULL, "e-mail", szBuff))
SetDlgItemText(hWndDlg, IDC_LOGIN, szBuff.c_str());
SetDlgItemText(hWndDlg, IDC_PASSWORD, _T(""));
@@ -74,10 +74,8 @@ INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lP CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW | OUF_TCHAR, (LPARAM)MRA_REGISTER_URL);
return TRUE;
}
- if ( HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus())
- {
- switch(LOWORD(wParam))
- {
+ if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) {
+ switch (LOWORD(wParam)) {
case IDC_LOGIN:
case IDC_PASSWORD:
SendMessage(GetParent(hWndDlg), PSM_CHANGED, 0, 0);
@@ -158,26 +156,24 @@ INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg, UINT msg, WPARAM wParam, L EnableWindow(GetDlgItem(hWndDlg, IDC_RTF_BGCOLOUR), IsDlgButtonChecked(hWndDlg, IDC_RTF_SEND_ENABLE));
break;
case IDC_BUTTON_FONT:
- {
- LOGFONT lf = {0};
- CHOOSEFONT cf = {0};
-
- cf.lStructSize = sizeof(cf);
- cf.lpLogFont = &lf;
- cf.rgbColors = ppro->getDword("RTFFontColour", MRA_DEFAULT_RTF_FONT_COLOUR);
- cf.Flags = (CF_SCREENFONTS|CF_EFFECTS|CF_FORCEFONTEXIST|CF_INITTOLOGFONTSTRUCT);
- if (ppro->mraGetContactSettingBlob(NULL, "RTFFont", &lf, sizeof(LOGFONT), NULL) == FALSE) {
- HDC hDC = GetDC(NULL);// kegl
- lf.lfCharSet = MRA_DEFAULT_RTF_FONT_CHARSET;
- lf.lfHeight = -MulDiv(MRA_DEFAULT_RTF_FONT_SIZE, GetDeviceCaps(hDC, LOGPIXELSY), 72);
- lstrcpyn(lf.lfFaceName, MRA_DEFAULT_RTF_FONT_NAME, LF_FACESIZE);
- ReleaseDC(NULL, hDC);
- }
-
- if (ChooseFont(&cf)) {
- ppro->mraWriteContactSettingBlob(NULL, "RTFFont", &lf, sizeof(LOGFONT));
- ppro->setDword("RTFFontColour", cf.rgbColors);
- }
+ LOGFONT lf = { 0 };
+ CHOOSEFONT cf = { 0 };
+
+ cf.lStructSize = sizeof(cf);
+ cf.lpLogFont = &lf;
+ cf.rgbColors = ppro->getDword("RTFFontColour", MRA_DEFAULT_RTF_FONT_COLOUR);
+ cf.Flags = (CF_SCREENFONTS | CF_EFFECTS | CF_FORCEFONTEXIST | CF_INITTOLOGFONTSTRUCT);
+ if (ppro->mraGetContactSettingBlob(NULL, "RTFFont", &lf, sizeof(LOGFONT), NULL) == FALSE) {
+ HDC hDC = GetDC(NULL);// kegl
+ lf.lfCharSet = MRA_DEFAULT_RTF_FONT_CHARSET;
+ lf.lfHeight = -MulDiv(MRA_DEFAULT_RTF_FONT_SIZE, GetDeviceCaps(hDC, LOGPIXELSY), 72);
+ lstrcpyn(lf.lfFaceName, MRA_DEFAULT_RTF_FONT_NAME, LF_FACESIZE);
+ ReleaseDC(NULL, hDC);
+ }
+
+ if (ChooseFont(&cf)) {
+ ppro->mraWriteContactSettingBlob(NULL, "RTFFont", &lf, sizeof(LOGFONT));
+ ppro->setDword("RTFFontColour", cf.rgbColors);
}
break;
}
|