From 227b6bea6ab0dea664291559d8b98daa6927126a Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Fri, 25 Jul 2014 19:35:35 +0800 Subject: [PATCH] Handle cursor files as icons when diffing Based on TortoiseSVN revision 25702 Signed-off-by: Sup Yut Sum --- src/TortoiseProc/AppUtils.cpp | 8 +++++--- src/Utils/MiscUI/Picture.cpp | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/TortoiseProc/AppUtils.cpp b/src/TortoiseProc/AppUtils.cpp index 3d0fc943b..758fd1ad6 100644 --- a/src/TortoiseProc/AppUtils.cpp +++ b/src/TortoiseProc/AppUtils.cpp @@ -1,7 +1,7 @@ // TortoiseGit - a Windows shell extension for easy version control // Copyright (C) 2008-2014 - TortoiseGit -// Copyright (C) 2003-2011, 2013 - TortoiseSVN +// Copyright (C) 2003-2011, 2013-2014 - TortoiseSVN // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -239,7 +239,8 @@ BOOL CAppUtils::StartExtMerge( (ext == _T(".bmp")) || (ext == _T(".gif")) || (ext == _T(".png")) || (ext == _T(".ico")) || (ext == _T(".tif")) || (ext == _T(".tiff")) || - (ext == _T(".dib")) || (ext == _T(".emf"))) + (ext == _T(".dib")) || (ext == _T(".emf")) || + (ext == _T(".cur"))) { com = CPathUtils::GetAppDirectory() + _T("TortoiseGitIDiff.exe"); com = _T("\"") + com + _T("\""); @@ -422,7 +423,8 @@ CString CAppUtils::PickDiffTool(const CTGitPath& file1, const CTGitPath& file2) if ((ext == _T(".jpg")) || (ext == _T(".jpeg")) || (ext == _T(".bmp")) || (ext == _T(".gif")) || (ext == _T(".png")) || (ext == _T(".ico")) || - (ext == _T(".dib")) || (ext == _T(".emf"))) + (ext == _T(".dib")) || (ext == _T(".emf")) || + (ext == _T(".cur"))) { return _T("\"") + CPathUtils::GetAppDirectory() + _T("TortoiseGitIDiff.exe") + _T("\"") + diff --git a/src/Utils/MiscUI/Picture.cpp b/src/Utils/MiscUI/Picture.cpp index eaf511a55..6fc9a7394 100644 --- a/src/Utils/MiscUI/Picture.cpp +++ b/src/Utils/MiscUI/Picture.cpp @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2003-2013 - TortoiseSVN +// Copyright (C) 2003-2014 - TortoiseSVN // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -168,7 +168,7 @@ bool CPicture::Load(tstring sFilePathName) // the image format is "icon" or not, we also check the // file extension for ".ico". std::transform(sFilePathName.begin(), sFilePathName.end(), sFilePathName.begin(), ::tolower); - bIsIcon = (guid == ImageFormatIcon) || (_tcsstr(sFilePathName.c_str(), _T(".ico")) != NULL); + bIsIcon = (guid == ImageFormatIcon) || (wcsstr(sFilePathName.c_str(), L".ico") != NULL) || (wcsstr(sFilePathName.c_str(), L".cur") != NULL); bIsTiff = (guid == ImageFormatTIFF) || (_tcsstr(sFilePathName.c_str(), _T(".tiff")) != NULL); m_Name = sFilePathName; -- 2.11.4.GIT