diff options
author | George Hazan <george.hazan@gmail.com> | 2014-10-04 21:02:35 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-10-04 21:02:35 +0000 |
commit | 7ec44c6c0d9dcd8a5311ce1800830c2644947b1a (patch) | |
tree | 552c48a65c8a0ca6620a51e7e1e8742c00c49093 /src/modules/protocols/protoopts.cpp | |
parent | 98893546090575b2356d6b1412a20503761fd8db (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@10694 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols/protoopts.cpp')
-rw-r--r-- | src/modules/protocols/protoopts.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index a60f91558e..ce801ca8fe 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -254,7 +254,7 @@ struct TAccListData static void sttClickButton(HWND hwndDlg, int idcButton)
{
- if (IsWindowEnabled( GetDlgItem(hwndDlg, idcButton)))
+ if (IsWindowEnabled(GetDlgItem(hwndDlg, idcButton)))
PostMessage(hwndDlg, WM_COMMAND, MAKEWPARAM(idcButton, BN_CLICKED), (LPARAM)GetDlgItem(hwndDlg, idcButton));
}
@@ -280,12 +280,10 @@ static LRESULT CALLBACK sttEditSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, break;
case WM_KILLFOCUS:
- {
- int length = GetWindowTextLength(hwnd) + 1;
- TCHAR *str = (TCHAR*)mir_alloc(sizeof(TCHAR) * length);
- GetWindowText(hwnd, str, length);
- SendMessage(GetParent(GetParent(hwnd)), WM_COMMAND, MAKEWPARAM(GetWindowLongPtr(GetParent(hwnd), GWL_ID), LBN_MY_RENAME), (LPARAM)str);
- }
+ int length = GetWindowTextLength(hwnd) + 1;
+ TCHAR *str = (TCHAR*)mir_alloc(sizeof(TCHAR) * length);
+ GetWindowText(hwnd, str, length);
+ SendMessage(GetParent(GetParent(hwnd)), WM_COMMAND, MAKEWPARAM(GetWindowLongPtr(GetParent(hwnd), GWL_ID), LBN_MY_RENAME), (LPARAM)str);
DestroyWindow(hwnd);
return 0;
}
@@ -342,8 +340,8 @@ static LRESULT CALLBACK AccListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA break;
case WM_MY_RENAME:
+ RECT rc;
{
- RECT rc;
struct TAccMgrData *parentDat = (struct TAccMgrData *)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA);
PROTOACCOUNT *pa = (PROTOACCOUNT *)ListBox_GetItemData(hwnd, ListBox_GetCurSel(hwnd));
if (!pa || pa->bOldProto || pa->bDynDisabled)
@@ -559,10 +557,9 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM return TRUE;
case WM_DRAWITEM:
+ HBRUSH hbrBack;
+ SIZE sz;
{
- HBRUSH hbrBack;
- SIZE sz;
-
int cxIcon = GetSystemMetrics(SM_CXSMICON);
int cyIcon = GetSystemMetrics(SM_CYSMICON);
@@ -834,11 +831,11 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM break;
case IDC_ADD:
- {
- AccFormDlgParam param = { PRAC_ADDED, NULL };
- if (IDOK == DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_ACCFORM), hwndDlg, AccFormDlgProc, (LPARAM)¶m))
- SendMessage(hwndDlg, WM_MY_REFRESH, 0, 0);
- }
+ {
+ AccFormDlgParam param = { PRAC_ADDED, NULL };
+ if (IDOK == DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_ACCFORM), hwndDlg, AccFormDlgProc, (LPARAM)¶m))
+ SendMessage(hwndDlg, WM_MY_REFRESH, 0, 0);
+ }
break;
case IDC_EDIT:
|