diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-16 20:33:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-16 20:33:13 +0000 |
commit | 769b537b5e1a99fc53aa7296fd2b21dc77a4071c (patch) | |
tree | 7df94b386078575e6186523e1a165e4b0ba7ad9f /plugins/IgnoreState | |
parent | 2e15a3c2aae091fcbdd3234931a2777d050e43e1 (diff) |
name conflicts solved
git-svn-id: http://svn.miranda-ng.org/main/trunk@14971 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IgnoreState')
-rw-r--r-- | plugins/IgnoreState/src/options.cpp | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/plugins/IgnoreState/src/options.cpp b/plugins/IgnoreState/src/options.cpp index 26bd7df886..d6fac3275f 100644 --- a/plugins/IgnoreState/src/options.cpp +++ b/plugins/IgnoreState/src/options.cpp @@ -30,35 +30,35 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP 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, Skin_LoadIcon(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 = 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));
+ {
+ 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, Skin_LoadIcon(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 = 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;
- }
- return TRUE;
+ return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
@@ -74,24 +74,23 @@ 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);
+ {
+ DWORD flags = 0;
+ TVITEM tvi;
+ tvi.mask = TVIF_HANDLE | TBIF_LPARAM;
+ 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();
}
- 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)
|