ON_COMMAND(ID_HELP_CONTENTS, OnHelpContents)
ON_UPDATE_COMMAND_UI(ID_HELP_CONTENTS, OnUpdateHelpContents)
ON_WM_CLOSE()
+ ON_COMMAND(ID_VIEW_WHITESPACE, OnViewWhitespace)
+ ON_UPDATE_COMMAND_UI(ID_VIEW_WHITESPACE, OnUpdateViewWhitespace)
+
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
m_bShowIdent = theApp.GetProfileInt(_T("Settings"), _T("ShowIdentical"), TRUE)!=0;
m_bShowBinaries = theApp.GetProfileInt(_T("Settings"), _T("ShowBinaries"), TRUE)!=0;
m_bBackup = theApp.GetProfileInt(_T("Settings"), _T("BackupFile"), TRUE)!=0;
+ m_bViewWhitespace = theApp.GetProfileInt(_T("Settings"), _T("ViewWhitespace"), FALSE)!=0;
m_bScrollToFirst = theApp.GetProfileInt(_T("Settings"), _T("ScrollToFirst"), FALSE)!=0;
m_nIgnoreWhitespace = theApp.GetProfileInt(_T("Settings"), _T("IgnoreSpace"), 1);
m_bHideBak = theApp.GetProfileInt(_T("Settings"), _T("HideBak"), TRUE)!=0;
// SetTextType will revert to language dependent defaults for tab
m_pLeft->SetTabSize(mf->m_nTabSize);
m_pRight->SetTabSize(mf->m_nTabSize);
+ m_pLeft->SetViewTabs(mf->m_bViewWhitespace);
+ m_pRight->SetViewTabs(mf->m_bViewWhitespace);
// set the frame window header
CChildFrame *pf = static_cast<CChildFrame *>(m_pMergeDoc->m_pView->GetParentFrame());
AfxGetApp()->WriteProfileInt(szRegSubKey, "Count", cnt);
}
+void CMainFrame::OnViewWhitespace()
+{
+ m_bViewWhitespace = !m_bViewWhitespace;
+ theApp.WriteProfileInt(_T("Settings"), _T("ViewWhitespace"), m_bViewWhitespace);
+
+ if (m_pLeft)
+ m_pLeft->SetViewTabs(mf->m_bViewWhitespace);
+
+ if (m_pRight)
+ m_pRight->SetViewTabs(mf->m_bViewWhitespace);
+}
+
+void CMainFrame::OnUpdateViewWhitespace(CCmdUI* pCmdUI)
+{
+ pCmdUI->SetCheck(m_bViewWhitespace);
+}
+
+
void CMainFrame::ConvertPathToSlashes(LPTSTR path)
{
TCHAR *ptr = path;
CMergeDoc *m_pMergeDoc;
CDirDoc *m_pDirDoc;
UINT m_nTabType;
+ BOOL m_bViewWhitespace;
// Implementation data
protected:
afx_msg void OnHelpContents();
afx_msg void OnUpdateHelpContents(CCmdUI* pCmdUI);
afx_msg void OnClose();
+ afx_msg void OnViewWhitespace();
+ afx_msg void OnUpdateViewWhitespace(CCmdUI* pCmdUI);
+
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
MENUITEM "Show &Different Files", ID_OPTIONS_SHOWDIFFERENT
MENUITEM "Show Le&ft Unique Files", ID_OPTIONS_SHOWUNIQUELEFT
MENUITEM "Show Ri&ght Unique Files", ID_OPTIONS_SHOWUNIQUERIGHT
- MENUITEM "Show &Binary Files", ID_OPTIONS_SHOWBINARIES
+ MENUITEM "S&how Binary Files", ID_OPTIONS_SHOWBINARIES
MENUITEM "Hide *.&BAK Files", ID_HIDE_BACKUP_FILES
MENUITEM SEPARATOR
MENUITEM "Select &Font...", ID_VIEW_SELECTFONT
MENUITEM "Use Default F&ont", ID_VIEW_USEDEFAULTFONT
MENUITEM SEPARATOR
+ MENUITEM "&View Whitespace", ID_VIEW_WHITESPACE
+ MENUITEM SEPARATOR
MENUITEM "&Toolbar", ID_VIEW_TOOLBAR
MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR
MENUITEM SEPARATOR
ID_DIR_OPEN_RIGHT_WITH "Open right file with..."
IDS_BIN_FILES_SAME "Binary files are identical"
ID_OPTIONS_SHOWBINARIES "Displays binary files"
+ ID_VIEW_WHITESPACE "Shows whitespace characters"
END
STRINGTABLE DISCARDABLE
static char THIS_FILE[] = __FILE__;
#endif
+
+// These maybe should be converted with some winapi function to make sure
+// they are printable and not garbage on different fonts...
#define TAB_CHARACTER _T('\xBB')
-#define SPACE_CHARACTER _T('\x95')
+#define SPACE_CHARACTER _T('\xB7') // _T('\x95')
#define DEFAULT_PRINT_MARGIN 1000 // 10 millimeters
const UINT MAX_TAB_LEN = 64;
m_bBookmarkExist = FALSE; // More bookmarks
m_bMultipleSearch = FALSE; // More search
- m_bViewTabs = FALSE;
}
+2003-02-18 Kimmo
+ [ 687039 ] View whitespaces on editor
+ MainFrm.h MainFrm.cpp Merge.rc resource.h ccrystaltextview.cpp
+
2003-02-15 Kimmo
[ 686699 ] Check & return file saving success
Merge.rc MergeDoc.h Mergedoc.cpp resource.h
#define ID_DIR_OPEN_RIGHT 32815
#define ID_DIR_OPEN_RIGHT_WITH 32816
#define ID_OPTIONS_SHOWBINARIES 32817
+#define ID_VIEW_WHITESPACE 32818
// Next default values for new objects
//
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_3D_CONTROLS 1
#define _APS_NEXT_RESOURCE_VALUE 114
-#define _APS_NEXT_COMMAND_VALUE 32818
+#define _APS_NEXT_COMMAND_VALUE 32819
#define _APS_NEXT_CONTROL_VALUE 1037
#define _APS_NEXT_SYMED_VALUE 108
#endif