Skip to content

Commit

Permalink
Add "Ignore codepage differences" to quick options
Browse files Browse the repository at this point in the history
  • Loading branch information
gerundt authored and sdottaka committed Oct 7, 2019
1 parent 20e7d94 commit 6d924dc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Src/MainFrm.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 2 additions & 0 deletions Src/MainFrm.h
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions Src/Merge.rc
Expand Up @@ -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:"
Expand Down
1 change: 1 addition & 0 deletions Src/resource.h
Expand Up @@ -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
Expand Down

0 comments on commit 6d924dc

Please sign in to comment.