Skip to content
Permalink
Browse files

Add "Ignore codepage differences" to quick options

  • Loading branch information...
gerundt authored and sdottaka committed Oct 7, 2019
1 parent 20e7d94 commit 6d924dcc4363d171d5be1160d1f040552d9d1603
Showing with 18 additions and 0 deletions.
  1. +14 −0 Src/MainFrm.cpp
  2. +2 −0 Src/MainFrm.h
  3. +1 −0 Src/Merge.rc
  4. +1 −0 Src/resource.h
@@ -223,6 +223,8 @@ BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
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_DIFF_IGNORECP, OnDiffIgnoreCP)
ON_UPDATE_COMMAND_UI(IDC_DIFF_IGNORECP, OnUpdateDiffIgnoreCP)
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)
@@ -2329,6 +2331,18 @@ void CMainFrame::OnUpdateDiffIgnoreEOL(CCmdUI* pCmdUI)
pCmdUI->Enable();
}

void CMainFrame::OnDiffIgnoreCP()
{
GetOptionsMgr()->SaveOption(OPT_CMP_IGNORE_CODEPAGE, !GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_CODEPAGE));
ApplyDiffOptions();
}

void CMainFrame::OnUpdateDiffIgnoreCP(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(GetOptionsMgr()->GetBool(OPT_CMP_IGNORE_CODEPAGE));
pCmdUI->Enable();
}

void CMainFrame::OnIncludeSubfolders()
{
GetOptionsMgr()->SaveOption(OPT_CMP_INCLUDE_SUBDIRS, !GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS));
@@ -289,6 +289,8 @@ class CMainFrame : public CMDIFrameWnd
afx_msg void OnUpdateDiffCaseSensitive(CCmdUI* pCmdUI);
afx_msg void OnDiffIgnoreEOL();
afx_msg void OnUpdateDiffIgnoreEOL(CCmdUI* pCmdUI);
afx_msg void OnDiffIgnoreCP();
afx_msg void OnUpdateDiffIgnoreCP(CCmdUI* pCmdUI);
afx_msg void OnIncludeSubfolders();
afx_msg void OnUpdateIncludeSubfolders(CCmdUI* pCmdUI);
afx_msg void OnCompareMethod(UINT nID);
@@ -786,6 +786,7 @@ BEGIN
END
MENUITEM "Case sensi&tive", IDC_DIFF_CASESENSITIVE
MENUITEM "Igno&re carriage return differences (Windows/Unix/Mac)", IDC_DIFF_IGNOREEOL
MENUITEM "Ignore codepage &differences", IDC_DIFF_IGNORECP
MENUITEM SEPARATOR
MENUITEM "&Include Subfolders", IDC_RECURS_CHECK
POPUP "&Compare method:"
@@ -489,6 +489,7 @@
#define IDC_USE_DIR_COMPARE_COLORS 1364
#define IDC_PLUGIN_FILEFILTERS 1365
#define IDC_PLUGIN_FILEFILTERS_DEFAULTS 1366
#define IDC_DIFF_IGNORECP 1377
#define IDC_EDIT_WHOLE_WORD 8603
#define IDC_EDIT_MATCH_CASE 8604
#define IDC_EDIT_FINDTEXT 8605

0 comments on commit 6d924dc

Please sign in to comment.
You can’t perform that action at this time.