void CDirDoc::RefreshOptions()
{
if (m_pCtxt)
- m_pCtxt->m_bRecursive = (theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1);
+ m_pCtxt->m_bRecursive = GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
if (m_pDirView)
m_pDirView->RefreshOptions();
}
// Update all dirdoc settings
for (auto pDirDoc : GetAllDirDocs())
pDirDoc->RefreshOptions();
+ for (auto pOpenDoc : GetAllOpenDocs())
+ pOpenDoc->RefreshOptions();
for (auto pMergeDoc : GetAllHexMergeDocs())
pMergeDoc->RefreshOptions();
}
const size_t fileCount = files.GetSize();
// If Ctrl pressed, do recursive compare
- bool recurse = !!::GetAsyncKeyState(VK_CONTROL) || !!theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0);
+ bool recurse = !!::GetAsyncKeyState(VK_CONTROL) || GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
// If user has <Shift> pressed with one file selected,
// assume it is an archive and set filenames to same
void CMainFrame::OnIncludeSubfolders()
{
- theApp.WriteProfileInt(_T("Settings"), _T("Recurse"), !(theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1));
+ GetOptionsMgr()->SaveOption(OPT_CMP_INCLUDE_SUBDIRS, !GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS));
// Update all dirdoc settings
for (auto pDirDoc : GetAllDirDocs())
pDirDoc->RefreshOptions();
void CMainFrame::OnUpdateIncludeSubfolders(CCmdUI* pCmdUI)
{
- pCmdUI->SetCheck(theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1);
+ pCmdUI->SetCheck(GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS));
pCmdUI->Enable();
}
dwFlags[2] |= FFILEOPEN_READONLY;
}
- WriteProfileInt(_T("Settings"), _T("Recurse"), bRecursive);
+ GetOptionsMgr()->SaveOption(OPT_CMP_INCLUDE_SUBDIRS, bRecursive);
BOOL rtn = GetMainFrame()->DoFileOpen(&files, dwFlags, bRecursive);
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,36,222,10\r
CONTROL "&Include unique subfolders contents",IDC_COMPARE_WALKSUBDIRS,\r
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,48,202,10\r
- CONTROL "&Automatically expand all subfolders",IDC_EXPAND_SUBDIRS,\r
+ CONTROL "&Include Subfolders",IDC_RECURS_CHECK,\r
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,60,202,10\r
- CONTROL "Ignore &Reparse Points",IDC_IGNORE_REPARSEPOINTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,202,10\r
- LTEXT "&Quick compare limit (MB):",IDC_STATIC,7,84,200,10\r
- EDITTEXT IDC_COMPARE_QUICKC_LIMIT,7,96,50,14,ES_AUTOHSCROLL,WS_EX_RTLREADING\r
- PUSHBUTTON "Defaults",IDC_COMPAREFOLDER_DEFAULTS,7,198,70,14\r
+ CONTROL "&Automatically expand all subfolders",IDC_EXPAND_SUBDIRS,\r
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,72,202,10\r
+ CONTROL "Ignore &Reparse Points",IDC_IGNORE_REPARSEPOINTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,84,202,10\r
+ LTEXT "&Quick compare limit (MB):",IDC_STATIC,7,96,200,10\r
+ EDITTEXT IDC_COMPARE_QUICKC_LIMIT,7,108,50,14,ES_AUTOHSCROLL,WS_EX_RTLREADING\r
+ PUSHBUTTON "Defaults",IDC_COMPAREFOLDER_DEFAULTS,7,210,70,14\r
END\r
\r
IDD_PROPPAGE_COMPARE_BINARY DIALOGEX 0, 0, 235, 205\r
{
DWORD dwFlags[3] = {FFILEOPEN_NOMRU, FFILEOPEN_NOMRU, FFILEOPEN_NOMRU};
GetMainFrame()->DoFileOpen(&m_filePaths, dwFlags,
- (theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1), NULL, _T(""), &infoUnpacker);
+ GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS), NULL, _T(""), &infoUnpacker);
CloseNow();
}
else
#include "stdafx.h"
#include "OpenDoc.h"
+#include "OptionsDef.h"
+#include "OptionsMgr.h"
#include "Merge.h"
// COpenDoc
void COpenDoc::RefreshOptions()
{
- m_bRecurse = (theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1);
+ m_bRecurse = GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
UpdateAllViews(NULL);
}
if (m_dwFlags[0] & FFILEOPEN_CMDLINE || m_dwFlags[1] & FFILEOPEN_CMDLINE)
bOverwriteRecursive = TRUE;
if (!bOverwriteRecursive)
- m_bRecurse = theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1;
+ m_bRecurse = GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
m_strUnpacker = m_infoHandler.pluginName;
UpdateData(FALSE);
}
SaveComboboxStates();
- theApp.WriteProfileInt(_T("Settings"), _T("Recurse"), m_bRecurse);
+ GetOptionsMgr()->SaveOption(OPT_CMP_INCLUDE_SUBDIRS, m_bRecurse);
LoadComboboxStates();
m_constraint.Persist(true, false);
extern const String OPT_CMP_QUICK_LIMIT OP("Settings/QuickMethodLimit");
extern const String OPT_CMP_WALK_UNIQUE_DIRS OP("Settings/ScanUnpairedDir");
extern const String OPT_CMP_IGNORE_REPARSE_POINTS OP("Settings/IgnoreReparsePoints");
+extern const String OPT_CMP_INCLUDE_SUBDIRS OP("Settings/Recurse");
// Image Compare options
extern const String OPT_CMP_IMG_FILEPATTERNS OP("Settings/ImageFilePatterns");
pOptions->InitOption(OPT_CMP_WALK_UNIQUE_DIRS, false);
pOptions->InitOption(OPT_CMP_IGNORE_REPARSE_POINTS, false);
pOptions->InitOption(OPT_CMP_IGNORE_CODEPAGE, true);
+ pOptions->InitOption(OPT_CMP_INCLUDE_SUBDIRS, true);
pOptions->InitOption(OPT_CMP_BIN_FILEPATTERNS, _T("*.bin;*.frx"));
, m_bStopAfterFirst(FALSE)
, m_bIgnoreSmallTimeDiff(FALSE)
, m_bIncludeUniqFolders(FALSE)
+ , m_bIncludeSubdirs(FALSE)
, m_bExpandSubdirs(FALSE)
, m_bIgnoreReparsePoints(FALSE)
, m_nQuickCompareLimit(4 * Mega)
DDX_Check(pDX, IDC_COMPARE_STOPFIRST, m_bStopAfterFirst);
DDX_Check(pDX, IDC_IGNORE_SMALLTIMEDIFF, m_bIgnoreSmallTimeDiff);
DDX_Check(pDX, IDC_COMPARE_WALKSUBDIRS, m_bIncludeUniqFolders);
+ DDX_Check(pDX, IDC_RECURS_CHECK, m_bIncludeSubdirs);
DDX_Check(pDX, IDC_EXPAND_SUBDIRS, m_bExpandSubdirs);
DDX_Check(pDX, IDC_IGNORE_REPARSEPOINTS, m_bIgnoreReparsePoints);
DDX_Text(pDX, IDC_COMPARE_QUICKC_LIMIT, m_nQuickCompareLimit);
//}}AFX_DATA_MAP
+ UpdateControls();
}
ON_BN_CLICKED(IDC_COMPAREFOLDER_DEFAULTS, OnDefaults)
//}}AFX_MSG_MAP
ON_CBN_SELCHANGE(IDC_COMPAREMETHODCOMBO, OnCbnSelchangeComparemethodcombo)
+ ON_BN_CLICKED(IDC_RECURS_CHECK, OnBnClickedRecursCheck)
END_MESSAGE_MAP()
/**
m_bStopAfterFirst = GetOptionsMgr()->GetBool(OPT_CMP_STOP_AFTER_FIRST);
m_bIgnoreSmallTimeDiff = GetOptionsMgr()->GetBool(OPT_IGNORE_SMALL_FILETIME);
m_bIncludeUniqFolders = GetOptionsMgr()->GetBool(OPT_CMP_WALK_UNIQUE_DIRS);
+ m_bIncludeSubdirs = GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
m_bExpandSubdirs = GetOptionsMgr()->GetBool(OPT_DIRVIEW_EXPAND_SUBDIRS);
m_bIgnoreReparsePoints = GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_REPARSE_POINTS);
m_nQuickCompareLimit = GetOptionsMgr()->GetInt(OPT_CMP_QUICK_LIMIT) / Mega ;
GetOptionsMgr()->SaveOption(OPT_CMP_STOP_AFTER_FIRST, m_bStopAfterFirst);
GetOptionsMgr()->SaveOption(OPT_IGNORE_SMALL_FILETIME, m_bIgnoreSmallTimeDiff);
GetOptionsMgr()->SaveOption(OPT_CMP_WALK_UNIQUE_DIRS, m_bIncludeUniqFolders);
+ GetOptionsMgr()->SaveOption(OPT_CMP_INCLUDE_SUBDIRS, m_bIncludeSubdirs);
GetOptionsMgr()->SaveOption(OPT_DIRVIEW_EXPAND_SUBDIRS, m_bExpandSubdirs);
GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_REPARSE_POINTS, m_bIgnoreReparsePoints);
combo->AddString(item.c_str());
combo->SetCurSel(m_compareMethod);
- EnableDlgItem(IDC_COMPARE_STOPFIRST, m_compareMethod == 1);
-
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
m_compareMethod = GetOptionsMgr()->GetDefault<unsigned>(OPT_CMP_METHOD);
m_bStopAfterFirst = GetOptionsMgr()->GetDefault<bool>(OPT_CMP_STOP_AFTER_FIRST);
m_bIncludeUniqFolders = GetOptionsMgr()->GetDefault<bool>(OPT_CMP_WALK_UNIQUE_DIRS);
+ m_bIncludeSubdirs = GetOptionsMgr()->GetDefault<bool>(OPT_CMP_INCLUDE_SUBDIRS);
m_bExpandSubdirs = GetOptionsMgr()->GetDefault<bool>(OPT_DIRVIEW_EXPAND_SUBDIRS);
m_bIgnoreReparsePoints = GetOptionsMgr()->GetDefault<bool>(OPT_CMP_IGNORE_REPARSE_POINTS);
m_nQuickCompareLimit = GetOptionsMgr()->GetDefault<unsigned>(OPT_CMP_QUICK_LIMIT) / Mega;
*/
void PropCompareFolder::OnCbnSelchangeComparemethodcombo()
{
- CComboBox * pCombo = (CComboBox*) GetDlgItem(IDC_COMPAREMETHODCOMBO);
+ UpdateControls();
+}
+
+void PropCompareFolder::OnBnClickedRecursCheck()
+{
+ UpdateControls();
+}
+
+void PropCompareFolder::UpdateControls()
+{
+ CComboBox * pCombo = (CComboBox*)GetDlgItem(IDC_COMPAREMETHODCOMBO);
EnableDlgItem(IDC_COMPARE_STOPFIRST, pCombo->GetCurSel() == 1);
+ EnableDlgItem(IDC_EXPAND_SUBDIRS, IsDlgButtonChecked(IDC_RECURS_CHECK) == 1);
}
bool m_bStopAfterFirst;
bool m_bIgnoreSmallTimeDiff;
bool m_bIncludeUniqFolders;
+ bool m_bIncludeSubdirs;
bool m_bExpandSubdirs;
bool m_bIgnoreReparsePoints;
unsigned m_nQuickCompareLimit;
afx_msg BOOL OnInitDialog();
afx_msg void OnDefaults();
afx_msg void OnCbnSelchangeComparemethodcombo();
+ afx_msg void OnBnClickedRecursCheck();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
+ void UpdateControls();
};
//{{AFX_INSERT_LOCATION}}
msgstr ""
"Project-Id-Version: WinMerge\n"
"Report-Msgid-Bugs-To: http://bugs.winmerge.org/\n"
-"POT-Creation-Date: 2016-03-15 00:30+0000\n"
+"POT-Creation-Date: 2016-04-24 20:00+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: English <winmerge-translate@lists.sourceforge.net>\n"