summaryrefslogtreecommitdiff
path: root/plugins/IgnoreState/src/options.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-16 15:26:05 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-16 15:26:05 +0000
commitc48a1b84f72cf016b6badf1c175ca02a8082bc9f (patch)
tree4afcf7e965191f9c8c809a9ccbbeaef251cc06c5 /plugins/IgnoreState/src/options.cpp
parentc7b0966057e567854aefd057b65b3c09b795b748 (diff)
IgnoreState: changed warning lavel to w4
git-svn-id: http://svn.miranda-ng.org/main/trunk@11466 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IgnoreState/src/options.cpp')
-rw-r--r--plugins/IgnoreState/src/options.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/plugins/IgnoreState/src/options.cpp b/plugins/IgnoreState/src/options.cpp
index 1dee050760..c928736353 100644
--- a/plugins/IgnoreState/src/options.cpp
+++ b/plugins/IgnoreState/src/options.cpp
@@ -16,7 +16,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ */
#include "commonheaders.h"
@@ -26,44 +26,44 @@ static bool bInitializing;
INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HWND hTree=GetDlgItem(hwndDlg,IDC_FILTER);
+ HWND hTree = GetDlgItem(hwndDlg, IDC_FILTER);
switch (msg) {
case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
- bInitializing = true;
- fill_filter();
-
- SetWindowLongPtr(hTree,GWL_STYLE,GetWindowLongPtr(hTree,GWL_STYLE)|TVS_NOHSCROLL);
-
- HIMAGELIST himlButtonIcons = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),ILC_COLOR32|ILC_MASK,2,2);
- TreeView_SetImageList(hTree,himlButtonIcons,TVSIL_NORMAL);
- TreeView_DeleteAllItems(hTree);
-
- for (int i=2; i < nII; i++) { // we don`t need it IGNORE_ALL and IGNORE_MESSAGE
- TVINSERTSTRUCT tvis={0};
- int index = ImageList_AddIcon(himlButtonIcons, LoadSkinnedIcon(ii[i].icon));
- tvis.hParent=NULL;
- tvis.hInsertAfter=TVI_LAST;
- tvis.item.mask=TVIF_PARAM|TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_STATE;
- tvis.item.lParam=(LPARAM)(ii[i].type);
- tvis.item.pszText=TranslateTS(ii[i].name);
- tvis.item.iImage=tvis.item.iSelectedImage=index;
- HTREEITEM hti = TreeView_InsertItem(hTree,&tvis);
- TreeView_SetCheckState(hTree, hti, checkState(ii[i].type));
- }
-
- CheckDlgButton(hwndDlg, IDC_IGNORE_IGNOREALL, bUseMirandaSettings ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_FILTER), !bUseMirandaSettings);
- bInitializing = false;
+ {
+ TranslateDialogDefault(hwndDlg);
+ bInitializing = true;
+ fill_filter();
+
+ SetWindowLongPtr(hTree, GWL_STYLE, GetWindowLongPtr(hTree, GWL_STYLE) | TVS_NOHSCROLL);
+
+ HIMAGELIST himlButtonIcons = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
+ TreeView_SetImageList(hTree, himlButtonIcons, TVSIL_NORMAL);
+ TreeView_DeleteAllItems(hTree);
+
+ for (int i = 2; i < nII; i++) { // we don`t need it IGNORE_ALL and IGNORE_MESSAGE
+ TVINSERTSTRUCT tvis = { 0 };
+ int index = ImageList_AddIcon(himlButtonIcons, LoadSkinnedIcon(ii[i].icon));
+ tvis.hParent = NULL;
+ tvis.hInsertAfter = TVI_LAST;
+ tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
+ tvis.item.lParam = (LPARAM)(ii[i].type);
+ tvis.item.pszText = TranslateTS(ii[i].name);
+ tvis.item.iImage = tvis.item.iSelectedImage = index;
+ HTREEITEM hti = TreeView_InsertItem(hTree, &tvis);
+ TreeView_SetCheckState(hTree, hti, checkState(ii[i].type));
}
- return TRUE;
+
+ CheckDlgButton(hwndDlg, IDC_IGNORE_IGNOREALL, bUseMirandaSettings ? BST_CHECKED : BST_UNCHECKED);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FILTER), !bUseMirandaSettings);
+ bInitializing = false;
+ }
+ return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_IGNORE_IGNOREALL:
- EnableWindow(GetDlgItem(hwndDlg, IDC_FILTER), BST_UNCHECKED == IsDlgButtonChecked(hwndDlg,IDC_IGNORE_IGNOREALL));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FILTER), BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_IGNORE_IGNOREALL));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
@@ -74,24 +74,24 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- {
- DWORD flags=0;
- TVITEM tvi;
- tvi.mask=TVIF_HANDLE|TBIF_LPARAM;
- HWND hTree=GetDlgItem(hwndDlg,IDC_FILTER);
- tvi.hItem=TreeView_GetRoot(hTree); //check ignore all
- while(tvi.hItem) {
- TreeView_GetItem(hTree,&tvi);
- if(TreeView_GetCheckState(hTree,tvi.hItem)) flags|=1<<(tvi.lParam-1);
- tvi.hItem=TreeView_GetNextSibling(hTree,tvi.hItem);
- }
- db_set_dw(NULL, MODULENAME, "Filter", flags);
-
- bUseMirandaSettings = IsDlgButtonChecked(hwndDlg,IDC_IGNORE_IGNOREALL) ? 1 : 0;
- db_set_b(NULL, MODULENAME, "UseMirandaSettings", bUseMirandaSettings);
-
- fill_filter();
+ {
+ DWORD flags = 0;
+ TVITEM tvi;
+ tvi.mask = TVIF_HANDLE | TBIF_LPARAM;
+ HWND hTree = GetDlgItem(hwndDlg, IDC_FILTER);
+ tvi.hItem = TreeView_GetRoot(hTree); //check ignore all
+ while (tvi.hItem) {
+ TreeView_GetItem(hTree, &tvi);
+ if (TreeView_GetCheckState(hTree, tvi.hItem)) flags |= 1 << (tvi.lParam - 1);
+ tvi.hItem = TreeView_GetNextSibling(hTree, tvi.hItem);
}
+ db_set_dw(NULL, MODULENAME, "Filter", flags);
+
+ bUseMirandaSettings = IsDlgButtonChecked(hwndDlg, IDC_IGNORE_IGNOREALL) ? 1 : 0;
+ db_set_b(NULL, MODULENAME, "UseMirandaSettings", bUseMirandaSettings);
+
+ fill_filter();
+ }
}
case IDC_FILTER:
if (((LPNMHDR)lParam)->code == NM_CLICK)
@@ -102,7 +102,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
return FALSE;
}
-int onOptInitialise(WPARAM wParam, LPARAM lParam)
+int onOptInitialise(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = g_hInst;