Revision: 4619
http://winmerge.svn.sourceforge.net/winmerge/?rev=4619&view=rev
Author: jtuc
Date: 2007-10-14 01:50:20 -0700 (Sun, 14 Oct 2007)
Log Message:
-----------
Patch #1804762 continued
Modified Paths:
--------------
trunk/Src/7zCommon.cpp
trunk/Src/7zCommon.h
trunk/Src/AboutDlg.cpp
trunk/Src/ClearCaseCmdLineParser.cpp
trunk/Src/ClearCaseCmdLineParser.h
trunk/Src/DiffContext.cpp
trunk/Src/DiffContext.h
trunk/Src/DiffFileData.cpp
trunk/Src/DiffFileData.h
trunk/Src/DiffItem.cpp
trunk/Src/DiffItem.h
trunk/Src/DiffThread.cpp
trunk/Src/DiffWrapper.cpp
trunk/Src/DiffWrapper.h
trunk/Src/DirActions.cpp
trunk/Src/DirCmpReport.cpp
trunk/Src/DirCmpReportDlg.cpp
trunk/Src/DirDoc.cpp
trunk/Src/DirDoc.h
trunk/Src/DirScan.cpp
trunk/Src/DirView.cpp
trunk/Src/DirView.h
trunk/Src/DirViewColHandler.cpp
trunk/Src/DirViewColItems.cpp
trunk/Src/DirViewColItems.h
trunk/Src/FileActionScript.cpp
trunk/Src/FileActionScript.h
trunk/Src/FileFilterHelper.cpp
trunk/Src/FileFilterHelper.h
trunk/Src/FileFiltersDlg.cpp
trunk/Src/FileOrFolderSelect.cpp
trunk/Src/FileTransform.cpp
trunk/Src/FileTransform.h
trunk/Src/FilterCommentsManager.cpp
trunk/Src/FilterCommentsManager.h
trunk/Src/FolderCmp.cpp
trunk/Src/FolderCmp.h
trunk/Src/LocationView.cpp
trunk/Src/MainFrm.cpp
trunk/Src/MainFrm.h
trunk/Src/MergeDiffDetailView.cpp
trunk/Src/MergeDoc.cpp
trunk/Src/MergeDoc.h
trunk/Src/MergeEditView.cpp
trunk/Src/OpenDlg.cpp
trunk/Src/PatchDlg.cpp
trunk/Src/PatchDlg.h
trunk/Src/PatchTool.cpp
trunk/Src/PatchTool.h
trunk/Src/PathContext.cpp
trunk/Src/PathContext.h
trunk/Src/PluginManager.cpp
trunk/Src/PluginManager.h
trunk/Src/Plugins.cpp
trunk/Src/ProjectFile.cpp
trunk/Src/ProjectFile.h
trunk/Src/ProjectFilePathsDlg.cpp
trunk/Src/SharedFilterDlg.cpp
trunk/Src/SharedFilterDlg.h
trunk/Src/SourceControl.cpp
trunk/Src/StdAfx.cpp
trunk/Src/StdAfx.h
trunk/Src/VSSHelper.cpp
trunk/Src/WinMergeCmdLineParser.cpp
trunk/Src/locality.cpp
trunk/Src/locality.h
trunk/Src/paths.cpp
trunk/Src/paths.h
Modified: trunk/Src/7zCommon.cpp
===================================================================
--- trunk/Src/7zCommon.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/7zCommon.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -372,6 +372,7 @@
{
case WM_INITDIALOG:
{
+ theApp.TranslateDialog(hWnd);
if (GetDlgItem(hWnd, 9001) == NULL)
{
// Dialog template isn't up to date. Give it a second chance.
@@ -833,7 +834,7 @@
if (!di.diffcode.isSideLeftOnly())
{
// Item is present on right side, i.e. folder is implied
- m_rgImpliedFoldersRight[di.sRightSubdir] = PVOID(1);
+ m_rgImpliedFoldersRight[di.sRightSubdir.c_str()] = PVOID(1);
}
}
else
@@ -842,7 +843,7 @@
if (!di.diffcode.isSideRightOnly())
{
// Item is present on left side, i.e. folder is implied
- m_rgImpliedFoldersLeft[di.sLeftSubdir] = PVOID(1);
+ m_rgImpliedFoldersLeft[di.sLeftSubdir.c_str()] = PVOID(1);
}
}
}
@@ -917,17 +918,17 @@
Envelope *envelope = new Envelope;
- const CString &sFilename = m_bRight ? di.sRightFilename : di.sLeftFilename;
- const CString &sSubdir = m_bRight ? di.sRightSubdir : di.sLeftSubdir;
+ const String &sFilename = m_bRight ? di.sRightFilename : di.sLeftFilename;
+ const String &sSubdir = m_bRight ? di.sRightSubdir : di.sLeftSubdir;
envelope->Name = sFilename;
- if (sSubdir.GetLength())
+ if (sSubdir.length())
{
- envelope->Name.Insert(0, '\\');
- envelope->Name.Insert(0, sSubdir);
+ envelope->Name.insert(0, '\\');
+ envelope->Name.insert(0, sSubdir);
}
envelope->FullPath = sFilename;
- envelope->FullPath.Insert(0, '\\');
- envelope->FullPath.Insert(0, m_bRight ?
+ envelope->FullPath.insert(0, '\\');
+ envelope->FullPath.insert(0, m_bRight ?
di.getRightFilepath(pDoc->GetRightBasePath()) :
di.getLeftFilepath(pDoc->GetLeftBasePath()));
@@ -941,7 +942,7 @@
if (isSideLeft)
{
// Item is missing on right side
- PVOID &implied = m_rgImpliedFoldersRight[di.sLeftSubdir];
+ PVOID &implied = m_rgImpliedFoldersRight[di.sLeftSubdir.c_str()];
if (!implied)
{
// Folder is not implied by some other file, and has
@@ -960,7 +961,7 @@
if (isSideRight)
{
// Item is missing on left side
- PVOID &implied = m_rgImpliedFoldersLeft[di.sRightSubdir];
+ PVOID &implied = m_rgImpliedFoldersLeft[di.sRightSubdir.c_str()];
if (!implied)
{
// Folder is not implied by some other file, and has
@@ -982,14 +983,14 @@
if (m_strFolderPrefix.GetLength())
{
- if (envelope->Name.GetLength())
- envelope->Name.Insert(0, '\\');
- envelope->Name.Insert(0, m_strFolderPrefix);
+ if (envelope->Name.length())
+ envelope->Name.insert(0, '\\');
+ envelope->Name.insert(0, m_strFolderPrefix);
}
item.Mask.Item = item.Mask.Name|item.Mask.FullPath|item.Mask.CheckIfPresent|Recurse;
- item.Name = envelope->Name;
- item.FullPath = envelope->FullPath;
+ item.Name = envelope->Name.c_str();
+ item.FullPath = envelope->FullPath.c_str();
return envelope;
}
@@ -1111,8 +1112,8 @@
void CDirView::DirItemEnumerator::CollectFiles(CString &strBuffer)
{
CDirDoc *pDoc = m_pView->GetDocument();
- const CString sLeftRootPath = pDoc->GetLeftBasePath();
- const CString sRightRootPath = pDoc->GetRightBasePath();
+ const String sLeftRootPath = pDoc->GetLeftBasePath();
+ const String sRightRootPath = pDoc->GetRightBasePath();
UINT i;
int cchBuffer = 0;
for (i = Open() ; i-- ; )
@@ -1123,7 +1124,7 @@
cchBuffer +=
(
m_bRight ? di.getRightFilepath(sLeftRootPath) : di.getLeftFilepath(sRightRootPath)
- ).GetLength() + (m_bRight ? di.sRightFilename : di.sLeftFilename).GetLength() + 2;
+ ).length() + (m_bRight ? di.sRightFilename : di.sLeftFilename).length() + 2;
}
}
LPTSTR pchBuffer = strBuffer.GetBufferSetLength(cchBuffer);
@@ -1136,8 +1137,8 @@
(
pchBuffer,
_T("%s\\%s"),
- m_bRight ? di.getRightFilepath(sLeftRootPath) : di.getLeftFilepath(sRightRootPath),
- m_bRight ? di.sRightFilename : di.sLeftFilename
+ m_bRight ? di.getRightFilepath(sLeftRootPath).c_str() : di.getLeftFilepath(sRightRootPath).c_str(),
+ m_bRight ? di.sRightFilename.c_str() : di.sLeftFilename.c_str()
) + 1;
}
}
Modified: trunk/Src/7zCommon.h
===================================================================
--- trunk/Src/7zCommon.h 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/7zCommon.h 2007-10-14 08:50:20 UTC (rev 4619)
@@ -20,10 +20,10 @@
{
public:
CTempPathContext *m_pParent;
- CString m_strLeftDisplayRoot;
- CString m_strRightDisplayRoot;
- CString m_strLeftRoot;
- CString m_strRightRoot;
+ String m_strLeftDisplayRoot;
+ String m_strRightDisplayRoot;
+ String m_strLeftRoot;
+ String m_strRightRoot;
CTempPathContext *DeleteHead();
};
@@ -52,8 +52,8 @@
typedef CListCtrl *pView;
struct Envelope : public Merge7z::Envelope
{
- CString Name;
- CString FullPath;
+ String Name;
+ String FullPath;
virtual void Free()
{
delete this;
Modified: trunk/Src/AboutDlg.cpp
===================================================================
--- trunk/Src/AboutDlg.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/AboutDlg.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -62,6 +62,7 @@
*/
BOOL CAboutDlg::OnInitDialog()
{
+ theApp.TranslateDialog(m_hWnd);
CDialog::OnInitDialog();
// Load application icon
@@ -73,7 +74,7 @@
CVersionInfo version(AfxGetResourceHandle());
CString sVersion = version.GetFixedProductVersion();
- AfxFormatString1(m_strVersion, IDS_VERSION_FMT, sVersion);
+ LangFormatString1(m_strVersion, IDS_VERSION_FMT, sVersion);
#ifdef _UNICODE
CString strUnicode;
@@ -85,7 +86,7 @@
CString sPrivateBuild = version.GetPrivateBuild();
if (!sPrivateBuild.IsEmpty())
{
- AfxFormatString1(m_strPrivateBuild, IDS_PRIVATEBUILD_FMT, sPrivateBuild);
+ LangFormatString1(m_strPrivateBuild, IDS_PRIVATEBUILD_FMT, sPrivateBuild);
}
CString copyright = version.GetLegalCopyright();
@@ -104,30 +105,30 @@
*/
void CAboutDlg::OnBnClickedOpenContributors()
{
- CString defPath = GetModulePath();
+ String defPath = GetModulePath();
// Don't add quotation marks yet, CFile doesn't like them
- CString docPath = defPath + _T("\\contributors.txt");
+ String docPath = defPath + _T("\\contributors.txt");
HINSTANCE ret = 0;
- if (paths_DoesPathExist(docPath) == IS_EXISTING_FILE)
+ if (paths_DoesPathExist(docPath.c_str()) == IS_EXISTING_FILE)
{
// Now, add quotation marks so ShellExecute() doesn't fail if path
// includes spaces
- docPath.Insert(0, _T("\""));
- docPath.Insert(docPath.GetLength(), _T("\""));
- ret = ShellExecute(m_hWnd, NULL, _T("notepad"), docPath, defPath, SW_SHOWNORMAL);
+ docPath.insert(0, _T("\""));
+ docPath.insert(docPath.length(), _T("\""));
+ ret = ShellExecute(m_hWnd, NULL, _T("notepad"), docPath.c_str(), defPath.c_str(), SW_SHOWNORMAL);
// values < 32 are errors (ref to MSDN)
if ((int)ret < 32)
{
// Try to open with associated application (.txt)
- ret = ShellExecute(m_hWnd, _T("open"), docPath, NULL, NULL, SW_SHOWNORMAL);
+ ret = ShellExecute(m_hWnd, _T("open"), docPath.c_str(), NULL, NULL, SW_SHOWNORMAL);
if ((int)ret < 32)
ResMsgBox1(IDS_ERROR_EXECUTE_FILE, _T("Notepad.exe"), MB_ICONSTOP);
}
}
else
- ResMsgBox1(IDS_ERROR_FILE_NOT_FOUND, docPath, MB_ICONSTOP);
+ ResMsgBox1(IDS_ERROR_FILE_NOT_FOUND, docPath.c_str(), MB_ICONSTOP);
}
Modified: trunk/Src/ClearCaseCmdLineParser.cpp
===================================================================
--- trunk/Src/ClearCaseCmdLineParser.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/ClearCaseCmdLineParser.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -80,15 +80,15 @@
}
else
{
- if ((m_bBaseFile == true) && m_sBaseFile.IsEmpty())
+ if ((m_bBaseFile == true) && m_sBaseFile.empty())
{
m_sBaseFile = pszParam;
}
- else if ((m_bOutFile == true) && m_sOutFile.IsEmpty())
+ else if ((m_bOutFile == true) && m_sOutFile.empty())
{
m_sOutFile = pszParam;
}
- else if ((m_bDesc == true) && m_sBaseDesc.IsEmpty())
+ else if ((m_bDesc == true) && m_sBaseDesc.empty())
{
m_sBaseDesc = pszParam;
m_bDesc = false;
@@ -104,18 +104,18 @@
}
else
{
- CString sFile = paths_GetLongPath(pszParam);
- m_CmdLineInfo.m_Files.SetAtGrow(m_CmdLineInfo.m_nFiles, sFile);
+ String sFile = paths_GetLongPath(pszParam);
+ m_CmdLineInfo.m_Files.SetAtGrow(m_CmdLineInfo.m_nFiles, sFile.c_str());
m_CmdLineInfo.m_nFiles += 1;
}
}
if (TRUE == bLast)
{
- if (FALSE == m_sOutFile.IsEmpty())
+ if (FALSE == m_sOutFile.empty())
{
- CString sFile = paths_GetLongPath(m_sOutFile);
- m_CmdLineInfo.m_Files.SetAtGrow(m_CmdLineInfo.m_nFiles, sFile);
+ String sFile = paths_GetLongPath(m_sOutFile.c_str());
+ m_CmdLineInfo.m_Files.SetAtGrow(m_CmdLineInfo.m_nFiles, sFile.c_str());
m_CmdLineInfo.m_nFiles += 1;
}
}
Modified: trunk/Src/ClearCaseCmdLineParser.h
===================================================================
--- trunk/Src/ClearCaseCmdLineParser.h 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/ClearCaseCmdLineParser.h 2007-10-14 08:50:20 UTC (rev 4619)
@@ -33,6 +33,7 @@
// $Id$
#include "CmdLineParser.h"
+#include "UnicodeString.h"
/**
* @brief Rational ClearCase's command line parser.
@@ -63,9 +64,9 @@
bool m_bBaseFile; /**< Files' common ancestor. Used till we'll have a 3-ways merge. */
bool m_bOutFile;
- CString m_sBaseFile;
- CString m_sBaseDesc;
- CString m_sOutFile;
+ String m_sBaseFile;
+ String m_sBaseDesc;
+ String m_sOutFile;
};
#endif // _CLEAR_CASE_CMD_LINE_PARSER_INCLUDED_
Modified: trunk/Src/DiffContext.cpp
===================================================================
--- trunk/Src/DiffContext.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffContext.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -158,7 +158,7 @@
*/
BOOL CDiffContext::UpdateInfoFromDiskHalf(DIFFITEM & di, BOOL bLeft)
{
- CString filepath;
+ String filepath;
if (bLeft == TRUE)
filepath = paths_ConcatPath(di.getLeftFilepath(GetNormalizedLeft()), di.sLeftFilename);
@@ -166,10 +166,10 @@
filepath = paths_ConcatPath(di.getRightFilepath(GetNormalizedRight()), di.sRightFilename);
DiffFileInfo & dfi = bLeft ? di.left : di.right;
- if (!dfi.Update((LPCTSTR)filepath))
+ if (!dfi.Update(filepath.c_str()))
return FALSE;
UpdateVersion(di, bLeft);
- GuessCodepageEncoding(filepath, &dfi.encoding, m_bGuessEncoding);
+ GuessCodepageEncoding(filepath.c_str(), &dfi.encoding, m_bGuessEncoding);
return TRUE;
}
@@ -208,12 +208,12 @@
if (di.diffcode.isDirectory())
return;
- CString spath;
+ String spath;
if (bLeft)
{
if (di.diffcode.isSideRightOnly())
return;
- LPCTSTR ext = PathFindExtension(di.sLeftFilename);
+ LPCTSTR ext = PathFindExtension(di.sLeftFilename.c_str());
if (!CheckFileForVersion(ext))
return;
spath = di.getLeftFilepath(GetNormalizedLeft());
@@ -223,7 +223,7 @@
{
if (di.diffcode.isSideLeftOnly())
return;
- LPCTSTR ext = PathFindExtension(di.sRightFilename);
+ LPCTSTR ext = PathFindExtension(di.sRightFilename.c_str());
if (!CheckFileForVersion(ext))
return;
spath = di.getRightFilepath(GetNormalizedRight());
@@ -231,7 +231,7 @@
}
// Get version info if it exists
- CVersionInfo ver(spath);
+ CVersionInfo ver(spath.c_str());
DWORD verMS = 0;
DWORD verLS = 0;
if (ver.GetFixedFileVersion(verMS, verLS))
@@ -315,7 +315,7 @@
}
/** @brief Forward call to retrieve plugin info (winds up in DirDoc) */
-void CDiffContext::FetchPluginInfos(const CString& filteredFilenames,
+void CDiffContext::FetchPluginInfos(LPCTSTR filteredFilenames,
PackingInfo ** infoUnpacker, PrediffingInfo ** infoPrediffer)
{
ASSERT(m_piPluginInfos);
Modified: trunk/Src/DiffContext.h
===================================================================
--- trunk/Src/DiffContext.h 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffContext.h 2007-10-14 08:50:20 UTC (rev 4619)
@@ -44,7 +44,7 @@
class IPluginInfos
{
public:
- virtual void FetchPluginInfos(const CString& filteredFilenames,
+ virtual void FetchPluginInfos(LPCTSTR filteredFilenames,
PackingInfo ** infoUnpacker,
PrediffingInfo ** infoPrediffer) = 0;
};
@@ -81,10 +81,10 @@
* Normalized paths are preferred to use - short paths are expanded
* and trailing slashes removed (except from root path).
*/
- CString GetLeftPath() const { return m_paths.GetLeft(FALSE); }
- CString GetRightPath() const { return m_paths.GetRight(FALSE); }
- CString GetNormalizedLeft() const { return m_paths.GetLeft(); }
- CString GetNormalizedRight() const { return m_paths.GetRight(); }
+ String GetLeftPath() const { return m_paths.GetLeft(FALSE); }
+ String GetRightPath() const { return m_paths.GetRight(FALSE); }
+ String GetNormalizedLeft() const { return m_paths.GetLeft(); }
+ String GetNormalizedRight() const { return m_paths.GetRight(); }
//@}
// change an existing difference
@@ -95,7 +95,7 @@
CompareOptions * GetCompareOptions(int compareMethod);
// retrieve or manufacture plugin info for specified file comparison
- void FetchPluginInfos(const CString& filteredFilenames,
+ void FetchPluginInfos(LPCTSTR filteredFilenames,
PackingInfo ** infoUnpacker, PrediffingInfo ** infoPrediffer);
bool ShouldAbort() const;
Modified: trunk/Src/DiffFileData.cpp
===================================================================
--- trunk/Src/DiffFileData.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffFileData.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -220,8 +220,8 @@
* return false if anything fails
* caller has to DeleteFile filepathTransformed, if it differs from filepath
*/
-bool DiffFileData::Filepath_Transform(FileLocation & fpenc, const CString & filepath, CString & filepathTransformed,
- const CString & filteredFilenames, PrediffingInfo * infoPrediffer, int fd)
+bool DiffFileData::Filepath_Transform(FileLocation & fpenc, const String & filepath, String & filepathTransformed,
+ LPCTSTR filteredFilenames, PrediffingInfo * infoPrediffer, int fd)
{
BOOL bMayOverwrite = FALSE; // temp variable set each time it is used
@@ -265,7 +265,7 @@
{
// fourth step : prepare for diffing
// may overwrite if we've already copied to temp file
- BOOL bMayOverwrite = (0 != filepathTransformed.CompareNoCase(filepath));
+ BOOL bMayOverwrite = 0 != lstrcmpi(filepathTransformed.c_str(), filepath.c_str());
if (!FileTransform_UCS2ToUTF8(filepathTransformed, bMayOverwrite))
return false;
}
Modified: trunk/Src/DiffFileData.h
===================================================================
--- trunk/Src/DiffFileData.h 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffFileData.h 2007-10-14 08:50:20 UTC (rev 4619)
@@ -45,8 +45,8 @@
void Close() { Reset(); }
void SetDisplayFilepaths(LPCTSTR szTrueFilepath1, LPCTSTR szTrueFilepath2);
- bool Filepath_Transform(FileLocation & fpenc, const CString & filepath, CString & filepathTransformed,
- const CString & filteredFilenames, PrediffingInfo * infoPrediffer, int fd);
+ bool Filepath_Transform(FileLocation & fpenc, const String & filepath, String & filepathTransformed,
+ LPCTSTR filteredFilenames, PrediffingInfo * infoPrediffer, int fd);
void GuessEncoding_from_buffer_in_DiffContext(int side, CDiffContext * pCtxt);
static void GuessEncoding_from_buffer(FileLocation & fpenc, const char **data, int count);
void GuessEncoding_from_FileLocation(FileLocation & fpenc);
Modified: trunk/Src/DiffItem.cpp
===================================================================
--- trunk/Src/DiffItem.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffItem.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -70,9 +70,9 @@
}
/** @brief Return path to left file, including all but file name */
-CString DIFFITEM::getLeftFilepath(const CString &sLeftRoot) const
+String DIFFITEM::getLeftFilepath(const String &sLeftRoot) const
{
- CString sPath;
+ String sPath;
if (!diffcode.isSideRightOnly())
{
sPath = paths_ConcatPath(sLeftRoot, sLeftSubdir);
@@ -81,9 +81,9 @@
}
/** @brief Return path to right file, including all but file name */
-CString DIFFITEM::getRightFilepath(const CString &sRightRoot) const
+String DIFFITEM::getRightFilepath(const String &sRightRoot) const
{
- CString sPath;
+ String sPath;
if (!diffcode.isSideLeftOnly())
{
sPath = paths_ConcatPath(sRightRoot, sRightSubdir);
Modified: trunk/Src/DiffItem.h
===================================================================
--- trunk/Src/DiffItem.h 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffItem.h 2007-10-14 08:50:20 UTC (rev 4619)
@@ -118,13 +118,13 @@
{
DiffFileInfo left; /**< Fileinfo for left file */
DiffFileInfo right; /**< Fileinfo for right file */
- CString sLeftFilename; /**< Left filename (without path!) */
- CString sRightFilename; /**< Right filename (without path!) */
- CString sLeftSubdir; /**< Left subdirectory from root of comparison */
- CString sRightSubdir; /**< Right subdirectory from root of comparison */
+ String sLeftFilename; /**< Left filename (without path!) */
+ String sRightFilename; /**< Right filename (without path!) */
+ String sLeftSubdir; /**< Left subdirectory from root of comparison */
+ String sRightSubdir; /**< Right subdirectory from root of comparison */
int nsdiffs; /**< Amount of non-ignored differences */
int nidiffs; /**< Amount of ignored differences */
- CString errorDesc; /**< technical note about error */
+ String errorDesc; /**< technical note about error */
UINT customFlags1; /**< Custom flags set 1 */
bool empty; /**< flag to mark diffitem that doesn't have any data */
DIFFCODE diffcode; /**< Compare result */
@@ -135,8 +135,8 @@
DIFFITEM(const DIFFITEM& di);
DIFFITEM& operator=(const DIFFITEM& di);
- CString getLeftFilepath(const CString &sLeftRoot) const;
- CString getRightFilepath(const CString &sRightRoot) const;
+ String getLeftFilepath(const String &sLeftRoot) const;
+ String getRightFilepath(const String &sRightRoot) const;
};
#endif // _DIFF_ITEM_H_
Modified: trunk/Src/DiffThread.cpp
===================================================================
--- trunk/Src/DiffThread.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffThread.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -225,8 +225,8 @@
bool casesensitive = false;
int depth = myStruct->bRecursive ? -1 : 0;
- paths.SetLeft(myStruct->context->GetNormalizedLeft());
- paths.SetRight(myStruct->context->GetNormalizedRight());
+ paths.SetLeft(myStruct->context->GetNormalizedLeft().c_str());
+ paths.SetRight(myStruct->context->GetNormalizedRight().c_str());
if (bOnlyRequested)
{
Modified: trunk/Src/DiffWrapper.cpp
===================================================================
--- trunk/Src/DiffWrapper.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffWrapper.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -177,7 +177,7 @@
* @brief Set text tested to find the prediffer automatically.
* Most probably a concatenated string of both filenames.
*/
-void CDiffWrapper::SetTextForAutomaticPrediff(const CString &text)
+void CDiffWrapper::SetTextForAutomaticPrediff(const String &text)
{
m_sToFindPrediffer = text;
}
@@ -615,7 +615,7 @@
* @param [in] filepath2 Second file to compare "changed file".
* @param [in] tempPaths Are given paths temporary (can be deleted)?.
*/
-void CDiffWrapper::SetPaths(const CString &filepath1, const CString &filepath2,
+void CDiffWrapper::SetPaths(const String &filepath1, const String &filepath2,
BOOL tempPaths)
{
m_s1File = filepath1;
@@ -629,7 +629,7 @@
* @param [in] OriginalFile1 First file to compare "(NON-TEMP) file".
* @param [in] OriginalFile2 Second file to compare "(NON-TEMP) file".
*/
-void CDiffWrapper::SetCompareFiles(const CString &OriginalFile1, const CString &OriginalFile2)
+void CDiffWrapper::SetCompareFiles(const String &OriginalFile1, const String &OriginalFile2)
{
m_sOriginalFile1 = OriginalFile1;
m_sOriginalFile2 = OriginalFile2;
@@ -643,7 +643,7 @@
* @param [in] altPath1 Alternative file path of first file.
* @param [in] altPath2 Alternative file path of second file.
*/
-void CDiffWrapper::SetAlternativePaths(const CString &altPath1, const CString &altPath2)
+void CDiffWrapper::SetAlternativePaths(const String &altPath1, const String &altPath2)
{
m_s1AlternativePath = altPath1;
m_s2AlternativePath = altPath2;
@@ -654,15 +654,15 @@
*/
BOOL CDiffWrapper::RunFileDiff()
{
- CString filepath1(m_s1File);
- CString filepath2(m_s2File);
- filepath1.Replace('/', '\\');
- filepath2.Replace('/', '\\');
+ String filepath1(m_s1File);
+ String filepath2(m_s2File);
+ replace_char(&*filepath1.begin(), '/', '\\');
+ replace_char(&*filepath2.begin(), '/', '\\');
BOOL bRet = TRUE;
USES_CONVERSION;
- CString strFile1Temp = filepath1;
- CString strFile2Temp = filepath2;
+ String strFile1Temp = filepath1;
+ String strFile2Temp = filepath2;
m_options.SetToDiffUtils();
//SwapToInternalSettings();
@@ -678,7 +678,7 @@
{
// this can only fail if the data can not be saved back (no more
// place on disk ???) What to do then ??
- FileTransform_Prediffing(strFile1Temp, m_sToFindPrediffer, m_infoPrediffer,
+ FileTransform_Prediffing(strFile1Temp, m_sToFindPrediffer.c_str(), m_infoPrediffer,
m_bPathsAreTemp);
}
else
@@ -689,7 +689,7 @@
{
// display a message box
CString sError;
- AfxFormatString2(sError, IDS_PREDIFFER_ERROR, strFile1Temp,
+ LangFormatString2(sError, IDS_PREDIFFER_ERROR, strFile1Temp.c_str(),
m_infoPrediffer->pluginName);
AfxMessageBox(sError, MB_OK | MB_ICONSTOP);
// don't use any more this prediffer
@@ -707,19 +707,19 @@
{
// display a message box
CString sError;
- AfxFormatString2(sError, IDS_PREDIFFER_ERROR, strFile2Temp,
+ LangFormatString2(sError, IDS_PREDIFFER_ERROR, strFile2Temp.c_str(),
m_infoPrediffer->pluginName);
AfxMessageBox(sError, MB_OK | MB_ICONSTOP);
// don't use any more this prediffer
m_infoPrediffer->bToBeScanned = FALSE;
- m_infoPrediffer->pluginName = _T("");
+ m_infoPrediffer->pluginName.Empty();
}
FileTransform_UCS2ToUTF8(strFile2Temp, m_bPathsAreTemp);
DiffFileData diffdata;
- diffdata.SetDisplayFilepaths(filepath1, filepath2); // store true names for diff utils patch file
+ diffdata.SetDisplayFilepaths(filepath1.c_str(), filepath2.c_str()); // store true names for diff utils patch file
// This opens & fstats both files (if it succeeds)
- if (!diffdata.OpenFiles(strFile1Temp, strFile2Temp))
+ if (!diffdata.OpenFiles(strFile1Temp.c_str(), strFile2Temp.c_str()))
{
return FALSE;
}
@@ -738,10 +738,10 @@
// what differences diff-engine sees!
#ifdef _DEBUG
// throw the diff into a temp file
- CString sTempPath = paths_GetTempPath(); // get path to Temp folder
- CString path = paths_ConcatPath(sTempPath, _T("Diff.txt"));
+ String sTempPath = paths_GetTempPath(); // get path to Temp folder
+ String path = paths_ConcatPath(sTempPath, _T("Diff.txt"));
- outfile = _tfopen(path, _T("w+"));
+ outfile = _tfopen(path.c_str(), _T("w+"));
if (outfile != NULL)
{
print_normal_script(script);
@@ -793,23 +793,23 @@
diffdata.Close();
// Delete temp files transformation functions possibly created
- if (filepath1.CompareNoCase(strFile1Temp) != 0)
+ if (lstrcmpi(filepath1.c_str(), strFile1Temp.c_str()) != 0)
{
- if (!::DeleteFile(strFile1Temp))
+ if (!::DeleteFile(strFile1Temp.c_str()))
{
LogErrorString(Fmt(_T("DeleteFile(%s) failed: %s"),
- strFile1Temp, GetSysError(GetLastError())));
+ strFile1Temp.c_str(), GetSysError(GetLastError())));
}
- strFile1Temp.Empty();
+ strFile1Temp.erase();
}
- if (filepath2.CompareNoCase(strFile2Temp) != 0)
+ if (lstrcmpi(filepath2.c_str(), strFile2Temp.c_str()) != 0)
{
- if (!::DeleteFile(strFile2Temp))
+ if (!::DeleteFile(strFile2Temp.c_str()))
{
LogErrorString(Fmt(_T("DeleteFile(%s) failed: %s"),
- strFile2Temp, GetSysError(GetLastError())));
+ strFile2Temp.c_str(), GetSysError(GetLastError())));
}
- strFile2Temp.Empty();
+ strFile2Temp.erase();
}
return bRet;
@@ -899,9 +899,9 @@
/**
* @brief Formats command-line for diff-engine last run (like it was called from command-line)
*/
-CString CDiffWrapper::FormatSwitchString()
+String CDiffWrapper::FormatSwitchString()
{
- CString switches;
+ String switches;
TCHAR tmpNum[5] = {0};
switch (m_options.m_outputStyle)
@@ -1066,15 +1066,15 @@
//Logic needed for Ignore comment option
DIFFOPTIONS options;
GetOptions(&options);
- CString asLwrCaseExt;
+ String asLwrCaseExt;
if (options.bFilterCommentsLines)
{
- CString LowerCaseExt = m_sOriginalFile1;
- int PosOfDot = LowerCaseExt.ReverseFind('.');
+ String LowerCaseExt = m_sOriginalFile1;
+ int PosOfDot = LowerCaseExt.rfind('.');
if (PosOfDot != -1)
{
- LowerCaseExt = LowerCaseExt.Mid(PosOfDot+1);
- LowerCaseExt.MakeLower();
+ LowerCaseExt.erase(0, PosOfDot + 1);
+ CharLower(&*LowerCaseExt.begin());
asLwrCaseExt = LowerCaseExt;
}
}
@@ -1148,7 +1148,7 @@
{
int QtyLinesLeft = (trans_b0 - trans_a0) + 1; //Determine quantity of lines in this block for left side
int QtyLinesRight = (trans_b1 - trans_a1) + 1;//Determine quantity of lines in this block for right side
- PostFilter(thisob->line0, QtyLinesLeft, thisob->line1, QtyLinesRight, op, *m_FilterCommentsManager, asLwrCaseExt);
+ PostFilter(thisob->line0, QtyLinesLeft, thisob->line1, QtyLinesRight, op, *m_FilterCommentsManager, asLwrCaseExt.c_str());
}
if (m_pFilterList && m_pFilterList->HasRegExps())
@@ -1194,16 +1194,16 @@
// Get paths, primarily use alternative paths, only if they are empty
// use full filepaths
- CString path1(m_s1AlternativePath);
- CString path2(m_s2AlternativePath);
- if (path1.IsEmpty())
+ String path1(m_s1AlternativePath);
+ String path2(m_s2AlternativePath);
+ if (path1.empty())
path1 = m_s1File;
- if (path2.IsEmpty())
+ if (path2.empty())
path2 = m_s2File;
- path1.Replace('\\', '/');
- path2.Replace('\\', '/');
- inf_patch[0].name = strdup(T2CA(path1));
- inf_patch[1].name = strdup(T2CA(path2));
+ replace_char(&*path1.begin(), '\\', '/');
+ replace_char(&*path2.begin(), '\\', '/');
+ inf_patch[0].name = strdup(T2CA(path1.c_str()));
+ inf_patch[1].name = strdup(T2CA(path2.c_str()));
outfile = NULL;
if (!m_sPatchFile.IsEmpty())
@@ -1221,9 +1221,9 @@
// Print "command line"
if (m_bAddCmdLine)
{
- CString switches = FormatSwitchString();
+ String switches = FormatSwitchString();
_ftprintf(outfile, _T("diff%s %s %s\n"),
- switches, path1, path2);
+ switches.c_str(), path1.c_str(), path2.c_str());
}
// Output patchfile
@@ -1267,10 +1267,10 @@
* @brief Set line filters, given as one string.
* @param [in] filterStr Filters.
*/
-void CDiffWrapper::SetFilterList(const CString &filterStr)
+void CDiffWrapper::SetFilterList(LPCTSTR filterStr)
{
// Remove filterlist if new filter is empty
- if (filterStr.IsEmpty())
+ if (*filterStr == '\0')
{
delete m_pFilterList;
m_pFilterList = NULL;
@@ -1278,41 +1278,39 @@
}
// Adding new filter without previous filter
- if (!filterStr.IsEmpty() && m_pFilterList == NULL)
+ if (m_pFilterList == NULL)
{
m_pFilterList = new FilterList;
}
m_pFilterList->RemoveAllFilters();
- if (!filterStr.IsEmpty())
- {
- char * regexp_str;
- FilterList::EncodingType type;
-
+
+ char * regexp_str;
+ FilterList::EncodingType type;
+
#ifdef UNICODE
- regexp_str = UCS2UTF8_ConvertToUtf8(filterStr);
- type = FilterList::ENC_UTF8;
+ regexp_str = UCS2UTF8_ConvertToUtf8(filterStr.c_str());
+ type = FilterList::ENC_UTF8;
#else
- CString tmp_str(filterStr);
- regexp_str = tmp_str.LockBuffer();
- type = FilterList::ENC_ANSI;
+ CString tmp_str(filterStr);
+ regexp_str = tmp_str.LockBuffer();
+ type = FilterList::ENC_ANSI;
#endif
- // Add every "line" of regexps to regexp list
- char * token;
- const char sep[] = "\r\n";
- token = strtok(regexp_str, sep);
- while (token)
- {
- m_pFilterList->AddRegExp(token, type);
- token = strtok(NULL, sep);
- }
+ // Add every "line" of regexps to regexp list
+ char * token;
+ const char sep[] = "\r\n";
+ token = strtok(regexp_str, sep);
+ while (token)
+ {
+ m_pFilterList->AddRegExp(token, type);
+ token = strtok(NULL, sep);
+ }
#ifdef UNICODE
- UCS2UTF8_Dealloc(regexp_str);
+ UCS2UTF8_Dealloc(regexp_str);
#else
- tmp_str.UnlockBuffer();
+ tmp_str.UnlockBuffer();
#endif
- }
}
/**
Modified: trunk/Src/DiffWrapper.h
===================================================================
--- trunk/Src/DiffWrapper.h 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DiffWrapper.h 2007-10-14 08:50:20 UTC (rev 4619)
@@ -157,25 +157,25 @@
void SetDiffList(DiffList *diffList);
void GetOptions(DIFFOPTIONS *options);
void SetOptions(const DIFFOPTIONS *options);
- void SetTextForAutomaticPrediff(const CString &text);
+ void SetTextForAutomaticPrediff(const String &text);
void SetPrediffer(PrediffingInfo * prediffer =NULL);
void GetPrediffer(PrediffingInfo * prediffer);
void SetPatchOptions(const PATCHOPTIONS *options);
void SetDetectMovedBlocks(BOOL bDetectMovedBlocks);
BOOL GetDetectMovedBlocks() { return (m_pMovedLines != NULL); }
BOOL SetAppendFiles(BOOL bAppendFiles);
- void SetPaths(const CString &filepath1, const CString &filepath2, BOOL tempPaths);
- void SetAlternativePaths(const CString &altPath1, const CString &altPath2);
+ void SetPaths(const String &filepath1, const String &filepath2, BOOL tempPaths);
+ void SetAlternativePaths(const String &altPath1, const String &altPath2);
BOOL RunFileDiff();
void GetDiffStatus(DIFFSTATUS *status);
void AddDiffRange(UINT begin0, UINT end0, UINT begin1, UINT end1, BYTE op);
void FixLastDiffRange(int leftBufferLines, int rightBufferLines, BOOL left);
MovedLines * GetMovedLines() { return m_pMovedLines; }
- void SetCompareFiles(const CString &OriginalFile1, const CString &OriginalFile2);
- void SetFilterList(const CString &filterStr);
+ void SetCompareFiles(const String &OriginalFile1, const String &OriginalFile2);
+ void SetFilterList(LPCTSTR filterStr);
protected:
- CString FormatSwitchString();
+ String FormatSwitchString();
BOOL Diff2Files(struct change ** diffs, DiffFileData *diffData,
int * bin_status, int * bin_file);
void LoadWinMergeDiffsFromDiffUtilsScript(struct change * script, const file_data * inf);
@@ -186,18 +186,18 @@
DiffutilsOptions m_options;
DIFFSTATUS m_status; /**< Status of last compare */
FilterList * m_pFilterList; /**< List of linefilters. */
- CString m_s1File; /**< Full path to first diff'ed file. */
- CString m_s2File; /**< Full path to second diff'ed file. */
- CString m_s1AlternativePath; /**< First file's alternative path (may be relative). */
- CString m_s2AlternativePath; /**< Second file's alternative path (may be relative). */
- CString m_sOriginalFile1; /**< First file's original (NON-TEMP) path. */
- CString m_sOriginalFile2; /**< Second file's original (NON-TEMP) path. */
+ String m_s1File; /**< Full path to first diff'ed file. */
+ String m_s2File; /**< Full path to second diff'ed file. */
+ String m_s1AlternativePath; /**< First file's alternative path (may be relative). */
+ String m_s2AlternativePath; /**< Second file's alternative path (may be relative). */
+ String m_sOriginalFile1; /**< First file's original (NON-TEMP) path. */
+ String m_sOriginalFile2; /**< Second file's original (NON-TEMP) path. */
CString m_sPatchFile; /**< Full path to created patch file. */
BOOL m_bPathsAreTemp; /**< Are compared paths temporary? */
/// prediffer info are stored only for MergeDoc
PrediffingInfo * m_infoPrediffer;
/// prediffer info are stored only for MergeDoc
- CString m_sToFindPrediffer;
+ String m_sToFindPrediffer;
BOOL m_bUseDiffList; /**< Are results returned in difflist? */
BOOL m_bCreatePatchFile; /**< Do we create a patch file? */
BOOL m_bAddCmdLine; /**< Do we add commandline to patch file? */
Modified: trunk/Src/DirActions.cpp
===================================================================
--- trunk/Src/DirActions.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DirActions.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -101,13 +101,13 @@
sDest = theApp.LoadString(IDS_TO);
}
- CString strSrc(src);
+ String strSrc(src);
if (paths_DoesPathExist(src) == IS_EXISTING_DIR)
{
if (!paths_EndsWithSlash(src))
strSrc += _T("\\");
}
- CString strDest(dest);
+ String strDest(dest);
if (paths_DoesPathExist(dest) == IS_EXISTING_DIR)
{
if (!paths_EndsWithSlash(dest))
@@ -117,8 +117,8 @@
dlg.m_question = strQuestion;
dlg.m_fromText = sOrig.c_str();
dlg.m_toText = sDest.c_str();
- dlg.m_fromPath = strSrc;
- dlg.m_toPath = strDest;
+ dlg.m_fromPath = strSrc.c_str();
+ dlg.m_toPath = strDest.c_str();
int rtn = dlg.DoModal();
return (rtn==IDYES);
@@ -197,7 +197,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_COPY;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -207,7 +207,7 @@
// We must check that paths still exists
CString failpath;
- BOOL succeed = CheckPathsExist(srFile, slFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(srFile.c_str(), slFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -243,7 +243,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_COPY;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -253,7 +253,7 @@
// We must first check that paths still exists
CString failpath;
- BOOL succeed = CheckPathsExist(slFile, srFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(slFile.c_str(), srFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -289,7 +289,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_DEL;
int selCount = 0;
int sel=-1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -299,7 +299,7 @@
// We must check that path still exists
CString failpath;
- BOOL succeed = CheckPathsExist(slFile, srFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(slFile.c_str(), srFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -331,7 +331,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_DEL;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -342,7 +342,7 @@
// We must first check that path still exists
CString failpath;
- BOOL succeed = CheckPathsExist(srFile, slFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(srFile.c_str(), slFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -377,7 +377,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_DEL;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -388,7 +388,7 @@
// We must first check that paths still exists
CString failpath;
- BOOL succeed = CheckPathsExist(srFile, slFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(srFile.c_str(), slFile.c_str(), ALLOW_ALL,
ALLOW_ALL, failpath);
if (succeed == FALSE)
{
@@ -424,7 +424,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_DEL;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -456,7 +456,7 @@
// We must first check that paths still exists
CString failpath;
- BOOL succeed = CheckPathsExist(slFile, srFile, leftFlags,
+ BOOL succeed = CheckPathsExist(slFile.c_str(), srFile.c_str(), leftFlags,
rightFlags, failpath);
if (succeed == FALSE)
{
@@ -498,7 +498,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_COPY;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -509,7 +509,7 @@
// We must check that path still exists
CString failpath;
- BOOL succeed = CheckPathsExist(slFile, srFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(slFile.c_str(), srFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -525,10 +525,13 @@
if (GetDocument()->GetRecursive())
{
- if (!di.sLeftSubdir.IsEmpty())
- sFullDest += di.sLeftSubdir + _T("\\");
+ if (!di.sLeftSubdir.empty())
+ {
+ sFullDest += di.sLeftSubdir.c_str();
+ sFullDest += _T("\\");
+ }
}
- sFullDest += di.sLeftFilename;
+ sFullDest += di.sLeftFilename.c_str();
act.dest = sFullDest;
act.src = slFile;
@@ -565,7 +568,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_COPY;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -576,7 +579,7 @@
// We must check that path still exists
CString failpath;
- BOOL succeed = CheckPathsExist(srFile, slFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(srFile.c_str(), slFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -592,10 +595,13 @@
if (GetDocument()->GetRecursive())
{
- if (!di.sRightSubdir.IsEmpty())
- sFullDest += di.sRightSubdir + _T("\\");
+ if (!di.sRightSubdir.empty())
+ {
+ sFullDest += di.sRightSubdir.c_str();
+ sFullDest += _T("\\");
+ }
}
- sFullDest += di.sRightFilename;
+ sFullDest += di.sRightFilename.c_str();
act.dest = sFullDest;
act.src = srFile;
@@ -632,7 +638,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_MOVE;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -643,7 +649,7 @@
// We must check that path still exists
CString failpath;
- BOOL succeed = CheckPathsExist(slFile, srFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(slFile.c_str(), srFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -656,10 +662,13 @@
sFullDest += _T("\\");
if (GetDocument()->GetRecursive())
{
- if (!di.sLeftSubdir.IsEmpty())
- sFullDest += di.sLeftSubdir + _T("\\");
+ if (!di.sLeftSubdir.empty())
+ {
+ sFullDest += di.sLeftSubdir.c_str();
+ sFullDest += _T("\\");
+ }
}
- sFullDest += di.sLeftFilename;
+ sFullDest += di.sLeftFilename.c_str();
act.dest = sFullDest;
act.src = slFile;
@@ -696,7 +705,7 @@
const FileAction::ACT_TYPE actType = FileAction::ACT_MOVE;
int selCount = 0;
int sel = -1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -707,7 +716,7 @@
// We must check that path still exists
CString failpath;
- BOOL succeed = CheckPathsExist(srFile, slFile, ALLOW_ALL,
+ BOOL succeed = CheckPathsExist(srFile.c_str(), slFile.c_str(), ALLOW_ALL,
ALLOW_DONT_CARE, failpath);
if (succeed == FALSE)
{
@@ -720,10 +729,13 @@
sFullDest += _T("\\");
if (GetDocument()->GetRecursive())
{
- if (!di.sRightSubdir.IsEmpty())
- sFullDest += di.sRightSubdir + _T("\\");
+ if (!di.sRightSubdir.empty())
+ {
+ sFullDest += di.sRightSubdir.c_str();
+ sFullDest += _T("\\");
+ }
}
- sFullDest += di.sRightFilename;
+ sFullDest += di.sRightFilename.c_str();
act.dest = sFullDest;
act.src = srFile;
@@ -780,7 +792,7 @@
if (actionList.GetActionItemCount() == 1)
{
if (!ConfirmCopy(item.UIOrigin, item.UIDestination,
- actionList.GetActionItemCount(), item.src, item.dest,
+ actionList.GetActionItemCount(), item.src.c_str(), item.dest.c_str(),
bDestIsSide))
{
return FALSE;
@@ -788,8 +800,8 @@
}
else
{
- CString src;
- CString dst;
+ String src;
+ String dst;
if (item.UIOrigin == FileActionItem::UI_LEFT)
src = GetDocument()->GetLeftBasePath();
@@ -813,7 +825,7 @@
}
if (!ConfirmCopy(item.UIOrigin, item.UIDestination,
- actionList.GetActionItemCount(), src, dst, bDestIsSide))
+ actionList.GetActionItemCount(), src.c_str(), dst.c_str(), bDestIsSide))
{
return FALSE;
}
@@ -885,7 +897,7 @@
if (act.UIResult == FileActionItem::UI_SYNC)
{
if (GetMainFrame()->m_bCheckinVCS)
- GetMainFrame()->CheckinToClearCase(act.dest);
+ GetMainFrame()->CheckinToClearCase(act.dest.c_str());
}
// Update doc (difflist)
@@ -955,14 +967,14 @@
}
/// Get directories of first selected item
-BOOL CDirView::GetSelectedDirNames(CString& strLeft, CString& strRight) const
+BOOL CDirView::GetSelectedDirNames(String& strLeft, String& strRight) const
{
BOOL bResult = GetSelectedFileNames(strLeft, strRight);
if (bResult)
{
- strLeft = GetPathOnly(strLeft);
- strRight = GetPathOnly(strRight);
+ strLeft = GetPathOnly(strLeft.c_str());
+ strRight = GetPathOnly(strRight.c_str());
}
return bResult;
}
@@ -1042,22 +1054,22 @@
/// is it possible to compare these two items?
BOOL CDirView::AreItemsOpenable(const DIFFITEM & di1, const DIFFITEM & di2) const
{
- CString sLeftBasePath = GetDocument()->GetLeftBasePath();
- CString sRightBasePath = GetDocument()->GetRightBasePath();
- CString sLeftPath1 = paths_ConcatPath(di1.getLeftFilepath(sLeftBasePath), di1.sLeftFilename);
- CString sLeftPath2 = paths_ConcatPath(di2.getLeftFilepath(sLeftBasePath), di2.sLeftFilename);
- CString sRightPath1 = paths_ConcatPath(di1.getRightFilepath(sRightBasePath), di1.sRightFilename);
- CString sRightPath2 = paths_ConcatPath(di2.getRightFilepath(sRightBasePath), di2.sRightFilename);
+ String sLeftBasePath = GetDocument()->GetLeftBasePath();
+ String sRightBasePath = GetDocument()->GetRightBasePath();
+ String sLeftPath1 = paths_ConcatPath(di1.getLeftFilepath(sLeftBasePath), di1.sLeftFilename);
+ String sLeftPath2 = paths_ConcatPath(di2.getLeftFilepath(sLeftBasePath), di2.sLeftFilename);
+ String sRightPath1 = paths_ConcatPath(di1.getRightFilepath(sRightBasePath), di1.sRightFilename);
+ String sRightPath2 = paths_ConcatPath(di2.getRightFilepath(sRightBasePath), di2.sRightFilename);
// Must not be binary (unless archive)
if
(
(di1.diffcode.isBin() || di2.diffcode.isBin())
&&! (
HasZipSupport()
- && (sLeftPath1.IsEmpty() || ArchiveGuessFormat(sLeftPath1))
- && (sRightPath1.IsEmpty() || ArchiveGuessFormat(sRightPath1))
- && (sLeftPath2.IsEmpty() || ArchiveGuessFormat(sLeftPath2))
- && (sRightPath2.IsEmpty() || ArchiveGuessFormat(sRightPath2))
+ && (sLeftPath1.empty() || ArchiveGuessFormat(sLeftPath1.c_str()))
+ && (sRightPath1.empty() || ArchiveGuessFormat(sRightPath1.c_str()))
+ && (sLeftPath2.empty() || ArchiveGuessFormat(sLeftPath2.c_str()))
+ && (sRightPath2.empty() || ArchiveGuessFormat(sRightPath2.c_str()))
)
)
{
@@ -1081,7 +1093,7 @@
// Allow to compare items if left & right path refer to same directory
// (which means there is effectively two files involved). No need to check
// side flags. If files weren't on both sides, we'd have no DIFFITEMs.
- if (sLeftBasePath.CompareNoCase(sRightBasePath) == 0)
+ if (lstrcmpi(sLeftBasePath.c_str(), sRightBasePath.c_str()) == 0)
return TRUE;
return FALSE;
@@ -1134,7 +1146,7 @@
}
/// get the file names on both sides for first selected item
-BOOL CDirView::GetSelectedFileNames(CString& strLeft, CString& strRight) const
+BOOL CDirView::GetSelectedFileNames(String& strLeft, String& strRight) const
{
int sel = m_pList->GetNextItem(-1, LVNI_SELECTED);
if (sel == -1)
@@ -1143,9 +1155,9 @@
return TRUE;
}
/// get file name on specified side for first selected item
-CString CDirView::GetSelectedFileName(SIDE_TYPE stype) const
+String CDirView::GetSelectedFileName(SIDE_TYPE stype) const
{
- CString left, right;
+ String left, right;
if (!GetSelectedFileNames(left, right)) return _T("");
return stype==SIDE_LEFT ? left : right;
}
@@ -1153,21 +1165,21 @@
* @brief Get the file names on both sides for specified item.
* @note Return empty strings if item is special item.
*/
-void CDirView::GetItemFileNames(int sel, CString& strLeft, CString& strRight) const
+void CDirView::GetItemFileNames(int sel, String& strLeft, String& strRight) const
{
POSITION diffpos = GetItemKey(sel);
if (diffpos == (POSITION)SPECIAL_ITEM_POS)
{
- strLeft.Empty();
- strRight.Empty();
+ strLeft.empty();
+ strRight.empty();
}
else
{
const DIFFITEM & di = GetDocument()->GetDiffByKey(diffpos);
- const CString leftrelpath = paths_ConcatPath(di.sLeftSubdir, di.sLeftFilename);
- const CString rightrelpath = paths_ConcatPath(di.sRightSubdir, di.sRightFilename);
- const CString & leftpath = GetDocument()->GetLeftBasePath();
- const CString & rightpath = GetDocument()->GetRightBasePath();
+ const String leftrelpath = paths_ConcatPath(di.sLeftSubdir, di.sLeftFilename);
+ const String rightrelpath = paths_ConcatPath(di.sRightSubdir, di.sRightFilename);
+ const String & leftpath = GetDocument()->GetLeftBasePath();
+ const String & rightpath = GetDocument()->GetRightBasePath();
strLeft = paths_ConcatPath(leftpath, leftrelpath);
strRight = paths_ConcatPath(rightpath, rightrelpath);
}
@@ -1179,11 +1191,11 @@
*/
void CDirView::GetItemFileNames(int sel, PathContext * paths) const
{
- CString strLeft;
- CString strRight;
+ String strLeft;
+ String strRight;
GetItemFileNames(sel, strLeft, strRight);
- paths->SetLeft(strLeft);
- paths->SetRight(strRight);
+ paths->SetLeft(strLeft.c_str());
+ paths->SetRight(strRight.c_str());
}
/**
@@ -1198,11 +1210,11 @@
{
int sel = GetSingleSelectedItem();
if (sel == -1) return;
- CString file = GetSelectedFileName(stype);
- if (file.IsEmpty()) return;
- int rtn = (int)ShellExecute(::GetDesktopWindow(), _T("edit"), file, 0, 0, SW_SHOWNORMAL);
+ String file = GetSelectedFileName(stype);
+ if (file.empty()) return;
+ int rtn = (int)ShellExecute(::GetDesktopWindow(), _T("edit"), file.c_str(), 0, 0, SW_SHOWNORMAL);
if (rtn==SE_ERR_NOASSOC)
- rtn = (int)ShellExecute(::GetDesktopWindow(), _T("open"), file, 0, 0, SW_SHOWNORMAL);
+ rtn = (int)ShellExecute(::GetDesktopWindow(), _T("open"), file.c_str(), 0, 0, SW_SHOWNORMAL);
if (rtn==SE_ERR_NOASSOC)
DoOpenWith(stype);
}
@@ -1212,12 +1224,12 @@
{
int sel = GetSingleSelectedItem();
if (sel == -1) return;
- CString file = GetSelectedFileName(stype);
- if (file.IsEmpty()) return;
+ String file = GetSelectedFileName(stype);
+ if (file.empty()) return;
CString sysdir;
if (!GetSystemDirectory(sysdir.GetBuffer(MAX_PATH), MAX_PATH)) return;
sysdir.ReleaseBuffer();
- CString arg = (CString)_T("shell32.dll,OpenAs_RunDLL ") + file;
+ CString arg = (CString)_T("shell32.dll,OpenAs_RunDLL ") + file.c_str();
ShellExecute(::GetDesktopWindow(), 0, _T("RUNDLL32.EXE"), arg, sysdir, SW_SHOWNORMAL);
}
@@ -1226,10 +1238,10 @@
{
int sel = GetSingleSelectedItem();
if (sel == -1) return;
- CString file = GetSelectedFileName(stype);
- if (file.IsEmpty()) return;
+ String file = GetSelectedFileName(stype);
+ if (file.empty()) return;
- GetMainFrame()->OpenFileToExternalEditor(file);
+ GetMainFrame()->OpenFileToExternalEditor(file.c_str());
}
/**
@@ -1240,7 +1252,7 @@
// Unlike other group actions, here we don't build an action list
// to execute; we just apply this change directly
int sel=-1;
- CString slFile, srFile;
+ String slFile, srFile;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
const DIFFITEM& di = GetDiffItem(sel);
@@ -1248,8 +1260,8 @@
!di.diffcode.isSideRightOnly())
{
GetItemFileNames(sel, slFile, srFile);
- CString filteredFilenames = slFile + (CString)_T("|") + srFile;
- GetDocument()->SetPluginPrediffSetting(filteredFilenames, newsetting);
+ String filteredFilenames = slFile + _T("|") + srFile;
+ GetDocument()->SetPluginPrediffSetting(filteredFilenames.c_str(), newsetting);
}
}
}
@@ -1261,7 +1273,6 @@
UINT CDirView::MarkSelectedForRescan()
{
int sel = -1;
- CString slFile, srFile;
int items = 0;
while ((sel = m_pList->GetNextItem(sel, LVNI_SELECTED)) != -1)
{
@@ -1287,9 +1298,9 @@
{
CString fmt;
if (nFilesAffected == nFilesTotal)
- AfxFormatString1(fmt, IDS_FILES_AFFECTED_FMT, NumToStr(nFilesTotal));
+ LangFormatString1(fmt, IDS_FILES_AFFECTED_FMT, NumToStr(nFilesTotal).c_str());
else
- AfxFormatString2(fmt, IDS_FILES_AFFECTED_FMT2, NumToStr(nFilesAffected), NumToStr(nFilesTotal));
+ LangFormatString2(fmt, IDS_FILES_AFFECTED_FMT2, NumToStr(nFilesAffected).c_str(), NumToStr(nFilesTotal).c_str());
return fmt;
}
@@ -1454,7 +1465,7 @@
{
ASSERT(NULL != szNewItemName);
- CString sLeftFile, sRightFile;
+ String sLeftFile, sRightFile;
int nSelItem = m_pList->GetNextItem(-1, LVNI_SELECTED);
ASSERT(-1 != nSelItem);
@@ -1463,7 +1474,7 @@
// We must check that paths still exists
CString failpath;
DIFFITEM &di = GetDiffItemRef(nSelItem);
- BOOL succeed = CheckPathsExist(sLeftFile, sRightFile,
+ BOOL succeed = CheckPathsExist(sLeftFile.c_str(), sRightFile.c_str(),
di.diffcode.isSideLeftOrBoth() ? ALLOW_FILE | ALLOW_FOLDER : ALLOW_DONT_CARE,
di.diffcode.isSideRightOrBoth() ? ALLOW_FILE | ALLOW_FOLDER : ALLOW_DONT_CARE,
failpath);
@@ -1480,9 +1491,9 @@
BOOL bRenameLeft = FALSE;
BOOL bRenameRight = FALSE;
if (di.diffcode.isSideLeftOrBoth())
- bRenameLeft = RenameOnSameDir(sLeftFile, szNewItemName);
+ bRenameLeft = RenameOnSameDir(sLeftFile.c_str(), szNewItemName);
if (di.diffcode.isSideRightOrBoth())
- bRenameRight = RenameOnSameDir(sRightFile, szNewItemName);
+ bRenameRight = RenameOnSameDir(sRightFile.c_str(), szNewItemName);
if ((TRUE == bRenameLeft) && (TRUE == bRenameRight))
{
@@ -1492,11 +1503,11 @@
else if (TRUE == bRenameLeft)
{
di.sLeftFilename = szNewItemName;
- di.sRightFilename.Empty();
+ di.sRightFilename.erase();
}
else if (TRUE == bRenameRight)
{
- di.sLeftFilename.Empty();
+ di.sLeftFilename.erase();
di.sRightFilename = szNewItemName;
}
Modified: trunk/Src/DirCmpReport.cpp
===================================================================
--- trunk/Src/DirCmpReport.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DirCmpReport.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -24,12 +24,12 @@
* @brief Return current time as string.
* @return Current time as CString.
*/
-static CString GetCurrentTimeString()
+static String GetCurrentTimeString()
{
time_t nTime = 0;
time(&nTime);
_int64 nTime64 = nTime;
- CString str = TimeString(&nTime64);
+ String str = TimeString(&nTime64);
return str;
}
@@ -82,10 +82,10 @@
*/
void DirCmpReport::SetRootPaths(const PathContext &paths)
{
- m_rootPaths.SetLeft(paths.GetLeft());
- m_rootPaths.SetRight(paths.GetRight());
- AfxFormatString2(m_sTitle, IDS_DIRECTORY_REPORT_TITLE,
- m_rootPaths.GetLeft(), m_rootPaths.GetRight());
+ m_rootPaths.SetLeft(paths.GetLeft().c_str());
+ m_rootPaths.SetRight(paths.GetRight().c_str());
+ LangFormatString2(m_sTitle, IDS_DIRECTORY_REPORT_TITLE,
+ m_rootPaths.GetLeft().c_str(), m_rootPaths.GetRight().c_str());
}
/**
@@ -117,7 +117,7 @@
DirCmpReportDlg dlg;
if (dlg.DoModal() == IDOK) try
{
- WaitStatusCursor waitstatus(LoadResString(IDS_STATUS_CREATEREPORT));
+ WaitStatusCursor waitstatus(IDS_STATUS_CREATEREPORT);
if (dlg.m_bCopyToClipboard)
{
if (!CWnd::GetSafeOwner()->OpenClipboard())
@@ -245,7 +245,7 @@
{
WriteString(m_sTitle);
WriteString(_T("\n"));
- WriteString(GetCurrentTimeString());
+ WriteString(GetCurrentTimeString().c_str());
WriteString(_T("\n"));
for (int currCol = 0; currCol < m_nColumns; currCol++)
{
@@ -327,7 +327,7 @@
WriteString(_T("<h2>"));
WriteString(m_sTitle);
WriteString(_T("</h2>\n<p>"));
- WriteString(GetCurrentTimeString());
+ WriteString(GetCurrentTimeString().c_str());
WriteString(_T("</p>\n"));
WriteString(_T("<table border=\"1\">\n<tr>\n"));
@@ -357,7 +357,7 @@
WriteString(_T("<WinMergeDiffReport version=\"1\">\n"));
WriteString(Fmt(_T("<left>%s</left>\n"), m_rootPaths.GetLeft()));
WriteString(Fmt(_T("<right>%s</right>\n"), m_rootPaths.GetRight()));
- WriteString(Fmt(_T("<time>%s</time>\n"), GetCurrentTimeString()));
+ WriteString(Fmt(_T("<time>%s</time>\n"), GetCurrentTimeString().c_str()));
// Add column headers
const CString rowEl = _T("column_name");
Modified: trunk/Src/DirCmpReportDlg.cpp
===================================================================
--- trunk/Src/DirCmpReportDlg.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DirCmpReportDlg.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -95,7 +95,7 @@
for (int i = 0; i < sizeof(f_types) / sizeof(f_types[0]); ++i)
{
const ReportTypeInfo & info = f_types[i];
- int ind = m_ctlStyle.InsertString(i, LoadResString(info.idDisplay));
+ int ind = m_ctlStyle.InsertString(i, theApp.LoadString(info.idDisplay).c_str());
m_ctlStyle.SetItemData(ind, info.reportType);
}
Modified: trunk/Src/DirDoc.cpp
===================================================================
--- trunk/Src/DirDoc.cpp 2007-10-14 08:45:30 UTC (rev 4618)
+++ trunk/Src/DirDoc.cpp 2007-10-14 08:50:20 UTC (rev 4619)
@@ -178,7 +178,7 @@
if (m_pCompareStats == NULL)
m_pCompareStats = new CompareStats();
- m_pCtxt = new CDiffContext(paths.GetLeft(), paths.GetRight());
+ m_pCtxt = new CDiffContext(paths.GetLeft().c_str(), paths.GetRight().c_str());
if (pTempPathContext)
{
@@ -211,44 +211,44 @@
* - ParentIsTempPath : upward ENABLED
*/
CDirDoc::AllowUpwardDirectory::ReturnCode
-CDirDoc::AllowUpwardDirectory(CString &leftParent, CString &rightParent)
+CDirDoc::AllowUpwardDirectory(String &leftParent, String &rightParent)
{
- const CString & left = GetLeftBasePath();
- const CString & right = GetRightBasePath();
+ const String & left = GetLeftBasePath();
+ const String & right = GetRightBasePath();
// If we have temp context it means we are comparing archives
if (m_pTempPathContext)
{
- LPCTSTR lname = PathFindFileName(left);
- LPCTSTR rname = PathFindFileName(right);
- int cchLeftRoot = m_pTempPathContext->m_strLeftRoot.GetLength();
+ LPCTSTR lname = PathFindFileName(left.c_str());
+ LPCTSTR rname = PathFindFileName(right.c_str());
+ int cchLeftRoot = m_pTempPathContext->m_strLeftRoot.length();
- if (left.GetLength() <= cchLeftRoot)
+ if (left.length() <= cchLeftRoot)
{
if (m_pTempPathContext->m_pParent)
{
leftParent = m_pTempPathContext->m_pParent->m_strLeftRoot;
rightParent = m_pTempPathContext->m_pParent->m_strRightRoot;
- if (GetPairComparability(leftParent, rightParent) != IS_EXISTING_DIR)
+ if (GetPairComparability(leftParent.c_str(), rightParent.c_str()) != IS_EXISTING_DIR)
return AllowUpwardDirectory::Never;
return AllowUpwardDirectory::ParentIsTempPath;
}
leftParent = m_pTempPathContext->m_strLeftDisplayRoot;
rightParent = m_pTempPathContext->m_strRightDisplayRoot;
- if (!m_pCtxt->m_piFilterGlobal->includeFile(leftParent, rightParent))
+ if (!m_pCtxt->m_piFilterGlobal->includeFile(leftParent.c_str(), rightParent.c_str()))
return AllowUpwardDirectory::Never;
if (lstrcmpi(lname, _T("ORIGINAL")) == 0 && lstrcmpi(rname, _T("ALTERED")) == 0)
{
- leftParent = paths_GetParentPath(leftParent);
- rightParent = paths_GetParentPath(rightParent);
+ leftParent = paths_GetParentPath(leftParent.c_str());
+ rightParent = paths_GetParentPath(rightParent.c_str());
}
- lname = PathFindFileName(leftParent);
- rname = PathFindFileName(rightParent);
+ lname = PathFindFileName(leftParent.c_str());
+ rname = PathFindFileName(rightParent.c_str());
if (lstrcmpi(lname, rname) == 0)
{
- leftParent = paths_GetParentPath(leftParent);
- rightParent = paths_GetParentPath(rightParent);
- if (GetPairComparability(leftParent, rightParent) != IS_EXISTING_DIR)
+ leftParent = paths_GetParentPath(leftParent.c_str());
+ rightParent = paths_GetParentPath(rightParent.c_str());
+ if (GetPairComparability(leftParent.c_str(), rightParent.c_str()) != IS_EXISTING_DIR)
return AllowUpwardDirectory::Never;
return AllowUpwardDirectory::ParentIsTempPath;
}
@@ -258,9 +258,9 @@
}
// If regular parent folders exist, allow opening them
- leftParent = paths_GetParentPath(left);
- rightParent = paths_GetParentPath(right);
- if (GetPairComparability(leftParent, rightParent) != IS_EXISTING_DIR)
+ leftParent = paths_GetParentPath(left.c_str());
+ rightParent = paths_GetParentPath(right.c_str());
+ if (GetPairComparability(leftParent.c_str(), rightParent.c_str()) != IS_EXISTING_DIR)
return AllowUpwardDirectory::Never;
return AllowUpwardDirectory::ParentIsRegularPath;
}
@@ -321,7 +321,7 @@
if (threadState == CDiffThread::THREAD_COMPARING)
return;
- m_statusCursor = new CustomStatusCursor(0, IDC_APPSTARTING, LoadResString(IDS_STATUS_RESCANNING));
+ m_statusCursor = new CustomStatusCursor(0, IDC_APPSTARTING, IDS_STATUS_RESCANNING);
GetLog()->Write(CLogFile::LNOTICE, _T("Starting directory scan:\n\tLeft: %s\n\tRight: %s\n"),
m_pCtxt->GetLeftPath(), m_pCtxt->GetRightPath());
@@ -376,8 +376,8 @@
m_diffThread.SetHwnd(m_pDirView->GetSafeHwnd());
m_diffThread.SetMessageIDs(MSG_UI_UPDATE);
m_diffThread.SetCompareSelected(!!m_bMarkedRescan);
- m_diffThread.CompareDirectories(m_pCtxt->GetNormalizedLeft(),
- m_pCtxt->GetNormalizedRight(), m_bRecursive);
+ m_diffThread.Comp...
[truncated message content] |