diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-26 14:46:20 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-26 14:46:20 +0000 |
commit | f4dcc091c78266178bee21334d9b5cbe86caa863 (patch) | |
tree | 5be7e3e34228b381f51802963daf46a4b12587e7 /plugins/DbChecker | |
parent | 7198c1fa4a1e28616726eee4060f66745fac73d3 (diff) |
"check consistency only" & "aggressive mode" are mutually exclusive
git-svn-id: http://svn.miranda-ng.org/main/trunk@7904 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbChecker')
-rw-r--r-- | plugins/DbChecker/src/fileaccess.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/DbChecker/src/fileaccess.cpp b/plugins/DbChecker/src/fileaccess.cpp index b545340155..398ae17311 100644 --- a/plugins/DbChecker/src/fileaccess.cpp +++ b/plugins/DbChecker/src/fileaccess.cpp @@ -37,7 +37,7 @@ INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARA case WZN_PAGECHANGING:
opts.bCheckOnly = IsDlgButtonChecked(hdlg, IDC_CHECKONLY);
- opts.bAggressive = IsDlgButtonChecked(hdlg, IDC_AGGRESSIVE);
+ opts.bAggressive = !opts.bCheckOnly && IsDlgButtonChecked(hdlg, IDC_AGGRESSIVE);
if (opts.bCheckOnly) opts.bBackup = 0;
else opts.bBackup = IsDlgButtonChecked(hdlg, IDC_BACKUP);
break;
@@ -56,8 +56,12 @@ INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARA break;
case IDC_CHECKONLY:
- EnableWindow(GetDlgItem(hdlg, IDC_BACKUP), !IsDlgButtonChecked(hdlg, IDC_CHECKONLY));
- EnableWindow(GetDlgItem(hdlg, IDC_STBACKUP), !IsDlgButtonChecked(hdlg, IDC_CHECKONLY));
+ BOOL bChecked = IsDlgButtonChecked(hdlg, IDC_CHECKONLY);
+ EnableWindow(GetDlgItem(hdlg, IDC_BACKUP), !bChecked);
+ EnableWindow(GetDlgItem(hdlg, IDC_STBACKUP), !bChecked);
+ EnableWindow(GetDlgItem(hdlg, IDC_AGGRESSIVE), !bChecked);
+ if (bChecked)
+ CheckDlgButton(hdlg, IDC_AGGRESSIVE, FALSE);
break;
}
break;
|