diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-13 13:00:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-13 13:00:12 +0000 |
commit | d89dd2fe88191ce9b8ff0f68b93b45d00cff64b4 (patch) | |
tree | b8541b46c88ec3c2902fa99e047cee717cdcaf73 /plugins/Mwclist/BkgrCfg.cpp | |
parent | de5eb083cd53451b14991b6c61474bad3b9a5249 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@392 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Mwclist/BkgrCfg.cpp')
-rw-r--r-- | plugins/Mwclist/BkgrCfg.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/Mwclist/BkgrCfg.cpp b/plugins/Mwclist/BkgrCfg.cpp index c8c565bd0e..c24974ccc7 100644 --- a/plugins/Mwclist/BkgrCfg.cpp +++ b/plugins/Mwclist/BkgrCfg.cpp @@ -159,8 +159,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
}
case WM_COMMAND:
- if (LOWORD(wParam) == IDC_BROWSE)
- {
+ if (LOWORD(wParam) == IDC_BROWSE) {
char str[MAX_PATH];
OPENFILENAMEA ofn = {0};
char filter[512];
@@ -179,16 +178,15 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (!GetOpenFileNameA(&ofn)) break;
SetDlgItemTextA(hwndDlg, IDC_FILENAME, str);
}
- else
- if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE) break;
+ else if (LOWORD(wParam) == IDC_FILENAME && HIWORD(wParam) != EN_CHANGE)
+ break;
+
if (LOWORD(wParam) == IDC_BITMAP)
SendMessage(hwndDlg, M_BKGR_UPDATE, 0,0);
if (LOWORD(wParam) == IDC_FILENAME && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
return 0;
- if (LOWORD(wParam) == IDC_BKGRLIST)
- {
- if (HIWORD(wParam) == CBN_SELCHANGE)
- {
+ if (LOWORD(wParam) == IDC_BKGRLIST) {
+ if (HIWORD(wParam) == CBN_SELCHANGE) {
SendMessage(hwndDlg, M_BKGR_GETSTATE, dat->indx, 0);
SendMessage(hwndDlg, M_BKGR_SETSTATE, dat->indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0,0), 0);
}
@@ -196,8 +194,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
{
int indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETCURSEL, 0,0);
- if (indx != CB_ERR && indx < dat->count)
- {
+ if (indx != CB_ERR && indx < dat->count) {
indx = SendDlgItemMessage(hwndDlg, IDC_BKGRLIST, CB_GETITEMDATA, indx, 0);
dat->item[indx].changed = TRUE;
@@ -266,8 +263,7 @@ static INT_PTR BkgrCfg_Register(WPARAM wParam,LPARAM lParam) value = (char *)mir_alloc(len + 4); // add room for flags (DWORD)
memcpy(value, szSetting, len);
tok = strchr(value, '/');
- if (tok == NULL)
- {
+ if (tok == NULL) {
mir_free(value);
return 1;
}
|