[Winmerge-svn] SF.net SVN: winmerge:[6420] branches/R2_12
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
From: <ki...@us...> - 2009-02-05 15:42:56
|
Revision: 6420 http://winmerge.svn.sourceforge.net/winmerge/?rev=6420&view=rev Author: kimmov Date: 2009-02-05 15:42:51 +0000 (Thu, 05 Feb 2009) Log Message: ----------- BUG: [ 2563314 ] Don't detect extensions for folder names Modified Paths: -------------- branches/R2_12/Docs/Users/ChangeLog.txt branches/R2_12/Src/DirViewColItems.cpp Modified: branches/R2_12/Docs/Users/ChangeLog.txt =================================================================== --- branches/R2_12/Docs/Users/ChangeLog.txt 2009-02-05 15:38:54 UTC (rev 6419) +++ branches/R2_12/Docs/Users/ChangeLog.txt 2009-02-05 15:42:51 UTC (rev 6420) @@ -26,6 +26,7 @@ Bugfix: Folder Compare:Copy Right/Left don't create folder Bugfix: Must Show Different to Show L/R Unique (#2129561) Bugfix: Could not copy files from right to left (#2556904) + Bugfix: Don't show file name extension for folders (#2563314) Translation updates: - Brazilian (#2461443, #2524796) - Chinese Traditional (#2540115) Modified: branches/R2_12/Src/DirViewColItems.cpp =================================================================== --- branches/R2_12/Src/DirViewColItems.cpp 2009-02-05 15:38:54 UTC (rev 6419) +++ branches/R2_12/Src/DirViewColItems.cpp 2009-02-05 15:42:51 UTC (rev 6420) @@ -189,12 +189,16 @@ /** * @brief Format Extension column data. - * @param [in] p Pointer to String having extension string. + * @param [in] p Pointer to DIFFITEM. * @return String to show in the column. */ static String ColExtGet(const CDiffContext *, const void *p) //sfilename { - const String &r = *static_cast<const String*>(p); + const DIFFITEM &di = *static_cast<const DIFFITEM*>(p); + // We don't show extension for folder names + if (di.diffcode.isDirectory()) + return _T(""); + const String &r = di.left.path; LPCTSTR s = PathFindExtension(r.c_str()); return s + _tcsspn(s, _T(".")); } @@ -827,7 +831,7 @@ { _T("Rmtime"), IDS_COLHDR_RTIMEM, IDS_COLDESC_RTIMEM, &ColTimeGet, &ColTimeSort, FIELD_OFFSET(DIFFITEM, right.mtime), 4, false, LVCFMT_LEFT }, { _T("Lctime"), IDS_COLHDR_LTIMEC, IDS_COLDESC_LTIMEC, &ColTimeGet, &ColTimeSort, FIELD_OFFSET(DIFFITEM, left.ctime), -1, false, LVCFMT_LEFT }, { _T("Rctime"), IDS_COLHDR_RTIMEC, IDS_COLDESC_RTIMEC, &ColTimeGet, &ColTimeSort, FIELD_OFFSET(DIFFITEM, right.ctime), -1, false, LVCFMT_LEFT }, - { _T("Ext"), IDS_COLHDR_EXTENSION, IDS_COLDESC_EXTENSION, &ColExtGet, &ColExtSort, FIELD_OFFSET(DIFFITEM, left.filename), 5, true, LVCFMT_LEFT }, + { _T("Ext"), IDS_COLHDR_EXTENSION, IDS_COLDESC_EXTENSION, &ColExtGet, &ColExtSort, 0, 5, true, LVCFMT_LEFT }, { _T("Lsize"), IDS_COLHDR_LSIZE, IDS_COLDESC_LSIZE, &ColSizeGet, &ColSizeSort, FIELD_OFFSET(DIFFITEM, left.size), -1, false, LVCFMT_RIGHT }, { _T("Rsize"), IDS_COLHDR_RSIZE, IDS_COLDESC_RSIZE, &ColSizeGet, &ColSizeSort, FIELD_OFFSET(DIFFITEM, right.size), -1, false, LVCFMT_RIGHT }, { _T("LsizeShort"), IDS_COLHDR_LSIZE_SHORT, IDS_COLDESC_LSIZE_SHORT, &ColSizeShortGet, &ColSizeSort, FIELD_OFFSET(DIFFITEM, left.size), -1, false, LVCFMT_RIGHT }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |