From: Kimmo Varis Date: Sun, 14 Oct 2007 18:50:24 +0000 (+0000) Subject: PATCH: [ 1804762 ] UI translation without compiled lang files X-Git-Tag: 2.16.5~3980 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7a3627860e9dcc1885de0dc401553aad59c2b961;p=winmerge-jp%2Fwinmerge-jp.git PATCH: [ 1804762 ] UI translation without compiled lang files Fix compile with VS2003 --- diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 35ce0862a..ca0e6687f 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -1289,7 +1289,7 @@ void CDiffWrapper::SetFilterList(LPCTSTR filterStr) FilterList::EncodingType type; #ifdef UNICODE - regexp_str = UCS2UTF8_ConvertToUtf8(filterStr.c_str()); + regexp_str = UCS2UTF8_ConvertToUtf8(filterStr); type = FilterList::ENC_UTF8; #else CString tmp_str(filterStr); diff --git a/Src/DirViewColHandler.cpp b/Src/DirViewColHandler.cpp index 0afabd539..7631cf2bb 100644 --- a/Src/DirViewColHandler.cpp +++ b/Src/DirViewColHandler.cpp @@ -5,7 +5,7 @@ * * @date Created: 2003-08-19 */ -// RCS ID line follows -- this is updated by CVS +// ID line follows -- this is updated by SVN // $Id$ @@ -31,17 +31,23 @@ static char THIS_FILE[] = __FILE__; /** - * @brief Get text for specified column (forwards to specific column handler) + * @brief Get text for specified column. + * This function retrieves the text for the specified colum. Text is + * retrieved by using column-specific handler functions. + * @param [in] pCtxt Compare context. + * @param [in] col Column number. + * @param [in] di Difference data. + * @return Text for the specified column. */ -String -CDirView::ColGetTextToDisplay(const CDiffContext *pCtxt, int col, const DIFFITEM & di) +String CDirView::ColGetTextToDisplay(const CDiffContext *pCtxt, int col, + const DIFFITEM & di) { // Custom properties have custom get functions const DirColInfo * pColInfo = DirViewColItems_GetDirColInfo(col); if (!pColInfo) { ASSERT(0); // fix caller, should not ask for nonexistent columns - return "???"; + return _T("???"); } ColGetFncPtrType fnc = pColInfo->getfnc; SIZE_T offset = pColInfo->offset; @@ -49,10 +55,17 @@ CDirView::ColGetTextToDisplay(const CDiffContext *pCtxt, int col, const DIFFITEM } /** - * @brief Sort two items on specified column (forwards to specific column handler) + * @brief Sort two items on specified column. + * This function determines order of two items in specified column. Order + * is determined by column-specific functions. + * @param [in] pCtxt Compare context. + * @param [in] col Column number to sort. + * @param [in] ldi Left difference item data. + * @param [in] rdi Right difference item data. + * @return Order of items. */ -int -CDirView::ColSort(const CDiffContext *pCtxt, int col, const DIFFITEM & ldi, const DIFFITEM &rdi) const +int CDirView::ColSort(const CDiffContext *pCtxt, int col, const DIFFITEM & ldi, + const DIFFITEM & rdi) const { // Custom properties have custom sort functions const DirColInfo * pColInfo = DirViewColItems_GetDirColInfo(col); diff --git a/Src/FileFiltersDlg.cpp b/Src/FileFiltersDlg.cpp index b9b0602d5..9dbdc69ba 100644 --- a/Src/FileFiltersDlg.cpp +++ b/Src/FileFiltersDlg.cpp @@ -393,7 +393,7 @@ void FileFiltersDlg::OnBnClickedFilterfileNewbutton() // Format path to template file String templatePath(globalPath); if (templatePath[templatePath.length() - 1] != '\\') - templatePath += "\\"; + templatePath += '\\'; templatePath += FILE_FILTER_TEMPLATE; if (paths_DoesPathExist(templatePath.c_str()) != IS_EXISTING_FILE) diff --git a/Src/FolderCmp.cpp b/Src/FolderCmp.cpp index 6eb162fc9..087a31e68 100644 --- a/Src/FolderCmp.cpp +++ b/Src/FolderCmp.cpp @@ -49,7 +49,9 @@ bool FolderCmp::RunPlugins(CDiffContext * pCtxt, PluginsContext * plugCtxt, CStr // Transformation happens here // text used for automatic mode : plugin filter must match it - String filteredFilenames = plugCtxt->origFileName1 + "|" + plugCtxt->origFileName2; + String filteredFilenames(plugCtxt->origFileName1); + filteredFilenames += '|'; + filteredFilenames += plugCtxt->origFileName2; // Get existing or new plugin infos pCtxt->FetchPluginInfos(filteredFilenames.c_str(), &plugCtxt->infoUnpacker, diff --git a/Src/paths.cpp b/Src/paths.cpp index ca570ecf8..63eec995f 100644 --- a/Src/paths.cpp +++ b/Src/paths.cpp @@ -3,7 +3,7 @@ * * @brief Path handling routines */ -// RCS ID line follows -- this is updated by CVS +// ID line follows -- this is updated by SVN // $Id$ #include "stdafx.h" @@ -219,7 +219,6 @@ String paths_GetLongPath(LPCTSTR szPath, BOOL bExpandEnvs) *end = 0; sLong += ptr; ptr = &end[1]; - String sTemp; // used at each step to hold fully qualified short name // now walk down each directory and do short to long name conversion while (ptr) @@ -230,7 +229,9 @@ String paths_GetLongPath(LPCTSTR szPath, BOOL bExpandEnvs) if (end) *end = 0; - sTemp = sLong + '\\' + ptr; + String sTemp(sLong); + sTemp += '\\'; + sTemp += ptr; // advance to next component (or set ptr==0 to flag end) ptr = (end ? end+1 : 0);