From 6b87156060833f87fb3d372024450a78702adc04 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 20 Oct 2012 15:42:34 +0000 Subject: minor cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@1991 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StatusPlugins/KeepStatus/options.cpp | 83 ++++++++++++++-------------- 1 file changed, 42 insertions(+), 41 deletions(-) (limited to 'plugins') diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index 4615d78895..03391e70e4 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -42,7 +42,6 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L { LVCOLUMN lvCol; LVITEM lvItem; - HWND hList; int i; DBVARIANT dbv; @@ -56,7 +55,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L if (!DBGetContactSetting(NULL, MODULENAME, SETTING_PINGHOST, &dbv)) SetDlgItemTextA(hwndDlg, IDC_PINGHOST, dbv.pszVal); // proto list - hList = GetDlgItem(hwndDlg,IDC_PROTOCOLLIST); + HWND hList = GetDlgItem(hwndDlg,IDC_PROTOCOLLIST); ListView_SetExtendedListViewStyleEx(hList, LVS_EX_FULLROWSELECT|LVS_EX_CHECKBOXES, LVS_EX_FULLROWSELECT|LVS_EX_CHECKBOXES); memset(&lvCol,0,sizeof(lvCol)); lvCol.mask = LVCF_WIDTH|LVCF_TEXT; @@ -132,7 +131,6 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L if (((LPNMHDR)lParam)->code == PSN_APPLY) { int i; LVITEM lvItem; - HWND hList; DBWriteContactSettingByte(NULL, MODULENAME, SETTING_MAXRETRIES, (BYTE)GetDlgItemInt(hwndDlg,IDC_MAXRETRIES, NULL, FALSE)); DBWriteContactSettingByte(NULL, MODULENAME, SETTING_CHECKCONNECTION, (BYTE)SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0)); @@ -142,10 +140,9 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L DBWriteContactSettingByte(NULL, MODULENAME, SETTING_CONTCHECK, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CONTCHECK)); DBWriteContactSettingByte(NULL, MODULENAME, SETTING_BYPING, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BYPING)); if (IsDlgButtonChecked(hwndDlg, IDC_BYPING)) { - int len; char *host; - len = SendDlgItemMessage(hwndDlg, IDC_PINGHOST, WM_GETTEXTLENGTH, 0, 0); + int len = SendDlgItemMessage(hwndDlg, IDC_PINGHOST, WM_GETTEXTLENGTH, 0, 0); if (len > 0) { host = ( char* )malloc(len+1); if (host != NULL) { @@ -155,7 +152,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L } } } - hList = GetDlgItem(hwndDlg,IDC_PROTOCOLLIST); + HWND hList = GetDlgItem(hwndDlg,IDC_PROTOCOLLIST); memset(&lvItem,0,sizeof(lvItem)); lvItem.mask=LVIF_PARAM; for (i=0;i