m_wndStatusBar.SetPaneText(2, s);
}
-
-BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*/, BOOL bRecurse /*= FALSE*/)
+BOOL CMainFrame::DoFileOpen(LPCTSTR pszLeft /*=NULL*/, LPCTSTR pszRight /*=NULL*/,
+ DWORD dwLeftFlags /*=0*/, DWORD dwRightFlags /*=0*/, BOOL bRecurse /*=FALSE*/)
{
CString strLeft(pszLeft);
CString strRight(pszRight);
CString strExt;
- CFileStatus status;
BOOL docNull;
CDirDoc * pDirDoc = GetDirDocToShow(&docNull);
else
{
//save the MRU left and right files.
- addToMru(pszLeft, _T("Files\\Left"));
- addToMru(pszRight, _T("Files\\Right"));
+ if (!(dwLeftFlags & FFILEOPEN_NOMRU))
+ addToMru(pszLeft, _T("Files\\Left"));
+ if (!(dwRightFlags & FFILEOPEN_NOMRU))
+ addToMru(pszRight, _T("Files\\Right"));
}
if (1)
#define BACKUP_FILE_EXT _T(".bak")
+enum
+{
+ FFILEOPEN_NONE = 0x0000,
+ FFILEOPEN_NOMRU = 0x0001
+};
class CDiffView;
class CDirView;
BOOL SyncFiles(LPCTSTR pszSrc, LPCTSTR pszDest, CString * psError);
BOOL DoSyncFiles(LPCTSTR pszSrc, LPCTSTR pszDest, CString * psError);
void UpdateCurrentFileStatus(CDirDoc * pDirDoc, UINT nStatus, int idx);
- BOOL DoFileOpen(LPCTSTR pszLeft = NULL, LPCTSTR pszRight = NULL, BOOL bRecurse = FALSE);
+ BOOL DoFileOpen(LPCTSTR pszLeft = NULL, LPCTSTR pszRight = NULL,
+ DWORD dwLeftFlags = 0, DWORD dwRightFlags = 0, BOOL bRecurse = FALSE);
void ShowMergeDoc(CDirDoc * pDirDoc, LPCTSTR szLeft, LPCTSTR szRight);
void UpdateResources();
HMENU NewDefaultMenu();
UINT nFiles=0;
BOOL recurse=FALSE;
files.SetSize(2);
+ DWORD dwLeftFlags = 0;
+ DWORD dwRightFlags = 0;
for (int i = 1; i < __argc; i++)
{
LPCTSTR pszParam = __targv[i];
// remove flag specifier
++pszParam;
+ // -r to compare recursively
if (!_tcsicmp(pszParam, _T("r")))
recurse=TRUE;
+ // -e to allow closing with single esc press
if (!_tcsicmp(pszParam, _T("e")))
m_bEscCloses = TRUE;
+
+ // -ur to not add left path to MEU
+ if (!_tcsicmp(pszParam, _T("ul")))
+ dwLeftFlags |= FFILEOPEN_NOMRU;
+
+ // -ur to not add right path to MRU
+ if (!_tcsicmp(pszParam, _T("ur")))
+ dwRightFlags |= FFILEOPEN_NOMRU;
+
+ // -ur to not add paths to MRU
+ if (!_tcsicmp(pszParam, _T("ub")))
+ {
+ dwLeftFlags |= FFILEOPEN_NOMRU;
+ dwRightFlags |= FFILEOPEN_NOMRU;
+ }
+
}
else
{
if (nFiles>2)
{
pMainFrame->m_strSaveAsPath = files[2];
- pMainFrame->DoFileOpen(files[0], files[1], recurse);
+ pMainFrame->DoFileOpen(files[0], files[1],
+ dwLeftFlags, dwRightFlags, recurse);
}
else if (nFiles>1)
{
pMainFrame->m_strSaveAsPath = _T("");
- pMainFrame->DoFileOpen(files[0], files[1], recurse);
+ pMainFrame->DoFileOpen(files[0], files[1],
+ dwLeftFlags, dwRightFlags, recurse);
}
else if (nFiles>0)
{
pMainFrame->m_strSaveAsPath = _T("");
- pMainFrame->DoFileOpen(files[0], "", recurse);
+ pMainFrame->DoFileOpen(files[0], "",
+ dwLeftFlags, dwRightFlags, recurse);
}
-
return TRUE;
}
2003-04-07 Kimmo
PATCH: [ 716308 ] Disable italic text
editlib: ccrystaltextview.cpp
+ PATCH: [ 715553 ] Add commandline options to not add paths to MRU
+ Usage: -ur to ignore rigth, -ul to ignore left and -ub to ignore both
+ WinMerge: MainFrm.h MainFrm.cpp Merge.cpp
2003-04-06 Kimmo
PATCH: [ 715457 ] LoadFromFile() rewrote