ON_UPDATE_COMMAND_UI(IDC_DIFF_CASESENSITIVE, OnUpdateDiffCaseSensitive)
ON_COMMAND(IDC_DIFF_IGNOREEOL, OnDiffIgnoreEOL)
ON_UPDATE_COMMAND_UI(IDC_DIFF_IGNOREEOL, OnUpdateDiffIgnoreEOL)
+ ON_COMMAND(IDC_RECURS_CHECK, OnIncludeSubfolders)
+ ON_UPDATE_COMMAND_UI(IDC_RECURS_CHECK, OnUpdateIncludeSubfolders)
ON_COMMAND_RANGE(ID_COMPMETHOD_FULL_CONTENTS, ID_COMPMETHOD_SIZE, OnCompareMethod)
ON_UPDATE_COMMAND_UI_RANGE(ID_COMPMETHOD_FULL_CONTENTS, ID_COMPMETHOD_SIZE, OnUpdateCompareMethod)
ON_COMMAND_RANGE(ID_MRU_FIRST, ID_MRU_LAST, OnMRUs)
pCmdUI->Enable();
}
+void CMainFrame::OnIncludeSubfolders()
+{
+ theApp.WriteProfileInt(_T("Settings"), _T("Recurse"), !(theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1));
+ // Update all dirdoc settings
+ const DirDocList &dirDocs = GetAllDirDocs();
+ POSITION pos = dirDocs.GetHeadPosition();
+ while (pos)
+ {
+ CDirDoc * pDirDoc = dirDocs.GetNext(pos);
+ pDirDoc->RefreshOptions();
+ }
+ const OpenDocList &openDocs = GetAllOpenDocs();
+ pos = openDocs.GetHeadPosition();
+ while (pos)
+ {
+ COpenDoc * pOpenDoc = openDocs.GetNext(pos);
+ pOpenDoc->RefreshOptions();
+ }
+}
+
+void CMainFrame::OnUpdateIncludeSubfolders(CCmdUI* pCmdUI)
+{
+ pCmdUI->SetCheck(theApp.GetProfileInt(_T("Settings"), _T("Recurse"), 0) == 1);
+ pCmdUI->Enable();
+}
+
void CMainFrame::OnCompareMethod(UINT nID)
{
GetOptionsMgr()->SaveOption(OPT_CMP_METHOD, nID - ID_COMPMETHOD_FULL_CONTENTS);
afx_msg void OnUpdateDiffCaseSensitive(CCmdUI* pCmdUI);
afx_msg void OnDiffIgnoreEOL();
afx_msg void OnUpdateDiffIgnoreEOL(CCmdUI* pCmdUI);
+ afx_msg void OnIncludeSubfolders();
+ afx_msg void OnUpdateIncludeSubfolders(CCmdUI* pCmdUI);
afx_msg void OnCompareMethod(UINT nID);
afx_msg void OnUpdateCompareMethod(CCmdUI* pCmdUI);
afx_msg void OnMRUs(UINT nID);
END
MENUITEM "Case sensi&tive", IDC_DIFF_CASESENSITIVE
MENUITEM "Igno&re carriage return differences (Windows/Unix/Mac)", IDC_DIFF_IGNOREEOL
+ MENUITEM SEPARATOR
+ MENUITEM "&Include Subfolders", IDC_RECURS_CHECK
POPUP "&Compare method:"
BEGIN
MENUITEM "Full Contents", ID_COMPMETHOD_FULL_CONTENTS