From 3cd17abbb69eabbf40c2621867281c1dd47e1455 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Thu, 12 Dec 2013 21:06:09 +0100 Subject: [PATCH] Drop ColumnProvider support Columns were not supported by TortoiseGit so far and Microsoft dropped support for this after WinXP. Hence, we're not going to need this any more. Signed-off-by: Sven Strickroth --- Languages/Tortoise.pot | 44 ---- src/Git/GitFolderStatus.cpp | 6 +- src/Git/GitFolderStatus.h | 2 +- src/Resources/TortoiseProcENG.rc | 2 +- src/TortoiseGitSetup/StructureFragment.wxi | 3 - src/TortoiseShell/ColumnProvider.cpp | 297 ------------------------ src/TortoiseShell/Documentation.h | 2 +- src/TortoiseShell/ShellCache.h | 42 ---- src/TortoiseShell/ShellExt.cpp | 4 - src/TortoiseShell/ShellExt.h | 31 --- src/TortoiseShell/TortoiseShell.vcxproj | 1 - src/TortoiseShell/TortoiseShell.vcxproj.filters | 3 - src/TortoiseShell/deregister.reg | 2 - src/TortoiseShell/register.registry | 2 - src/TortoiseShell/register_recover.registry | 2 - src/TortoiseShell/registerrelease.registry | 2 - src/TortoiseShell/resource.h | 10 - src/TortoiseShell/resourceshell.rc | 10 - 18 files changed, 5 insertions(+), 460 deletions(-) delete mode 100644 src/TortoiseShell/ColumnProvider.cpp diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index 866649953..336eed95e 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -4634,10 +4634,6 @@ msgstr "" msgid "Git" msgstr "" -#. Resource IDs: (16) -msgid "Git Author" -msgstr "" - #. Resource IDs: (300) msgid "Git Command Progress" msgstr "" @@ -4686,10 +4682,6 @@ msgstr "" msgid "Git Remote Settings" msgstr "" -#. Resource IDs: (11) -msgid "Git Revision" -msgstr "" - #. Resource IDs: (1260) msgid "Git Revision List" msgstr "" @@ -4702,18 +4694,10 @@ msgstr "" msgid "Git SVN Rebase" msgstr "" -#. Resource IDs: (11) -msgid "Git Status" -msgstr "" - #. Resource IDs: (326) msgid "Git Synchronization" msgstr "" -#. Resource IDs: (12) -msgid "Git URL" -msgstr "" - #. Resource IDs: (297) msgid "Git clone - TortoiseGit" msgstr "" @@ -4742,10 +4726,6 @@ msgstr "" msgid "Git revision list follows file renames" msgstr "" -#. Resource IDs: (12) -msgid "Git short URL" -msgstr "" - #. Resource IDs: (93) msgid "Git uses the concept of a hierarchical configuration.\nI.e. there are multiple levels; settings in higher levels override values in lower levels.\nThe \"Effective\" tab shows you the effective values for the current scope (read-only).\nSelect any level to see the values stored there.\nIn order to change settings select a level, enter the values and select where to store to." msgstr "" @@ -5144,10 +5124,6 @@ msgstr "" msgid "Icon Overlays" msgstr "" -#. Resource IDs: (65535) -msgid "Icon Overlays/Status Columns" -msgstr "" - #. Resource IDs: (184) msgid "Icon Overlays::Icon Set" msgstr "" @@ -5496,10 +5472,6 @@ msgstr "" msgid "Last known &good:" msgstr "" -#. Resource IDs: (11) -msgid "Last saved revision of item" -msgstr "" - #. Resource IDs: (12) msgid "Launches the external diff/merge program to solve the conflicts" msgstr "" @@ -7977,10 +7949,6 @@ msgstr "" msgid "Short &date/time format in log messages" msgstr "" -#. Resource IDs: (12) -msgid "Short URL of Git items" -msgstr "" - #. Resource IDs: (1255) msgid "Shorten property list" msgstr "" @@ -8444,10 +8412,6 @@ msgstr "" msgid "Status cache only for one folder, no recursive overlays" msgstr "" -#. Resource IDs: (11) -msgid "Status of item in Git" -msgstr "" - #. Resource IDs: (13) msgid "Stops bisect mode" msgstr "" @@ -8921,10 +8885,6 @@ msgstr "" msgid "The two selected URL's are not created from the same root.\nIt's not possible to show the log messages between them!" msgstr "" -#. Resource IDs: (16) -msgid "The user who did the last commit" -msgstr "" - #. Resource IDs: (65535) msgid "Their file:" msgstr "" @@ -9224,10 +9184,6 @@ msgstr "" msgid "URL history" msgstr "" -#. Resource IDs: (12) -msgid "URL of Git items" -msgstr "" - #. Resource IDs: (65535) msgid "URL:" msgstr "" diff --git a/src/Git/GitFolderStatus.cpp b/src/Git/GitFolderStatus.cpp index 1f798756b..4dcb85e95 100644 --- a/src/Git/GitFolderStatus.cpp +++ b/src/Git/GitFolderStatus.cpp @@ -161,7 +161,7 @@ DWORD GitFolderStatus::GetTimeoutValue() return factor*timeout; } -const FileStatusCacheEntry * GitFolderStatus::GetFullStatus(const CTGitPath& filepath, BOOL bIsFolder, BOOL bColumnProvider) +const FileStatusCacheEntry * GitFolderStatus::GetFullStatus(const CTGitPath& filepath, BOOL bIsFolder) { const FileStatusCacheEntry * ret = NULL; @@ -169,7 +169,7 @@ const FileStatusCacheEntry * GitFolderStatus::GetFullStatus(const CTGitPath& fil BOOL bHasAdminDir = g_ShellCache.HasGITAdminDir(filepath.GetWinPath(), bIsFolder, &sProjectRoot); //no overlay for unversioned folders - if ((!bColumnProvider)&&(!bHasAdminDir)) + if (!bHasAdminDir) return &invalidstatus; //for the SVNStatus column, we have to check the cache to see //if it's not just unversioned but ignored @@ -189,8 +189,6 @@ const FileStatusCacheEntry * GitFolderStatus::GetFullStatus(const CTGitPath& fil //if it's not in the cache and has no admin dir, then we assume //it's not ignored too - if ((bColumnProvider)&&(!bHasAdminDir)) - return &invalidstatus; ret = BuildCache(filepath, sProjectRoot, bIsFolder); if (ret) return ret; diff --git a/src/Git/GitFolderStatus.h b/src/Git/GitFolderStatus.h index 4594183df..0012c13e3 100644 --- a/src/Git/GitFolderStatus.h +++ b/src/Git/GitFolderStatus.h @@ -54,7 +54,7 @@ class GitFolderStatus public: GitFolderStatus(void); ~GitFolderStatus(void); - const FileStatusCacheEntry * GetFullStatus(const CTGitPath& filepath, BOOL bIsFolder, BOOL bColumnProvider = FALSE); + const FileStatusCacheEntry * GetFullStatus(const CTGitPath& filepath, BOOL bIsFolder); const FileStatusCacheEntry * GetCachedItem(const CTGitPath& filepath); FileStatusCacheEntry invalidstatus; diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index bce1fd7be..6a5a4c2f5 100644 --- a/src/Resources/TortoiseProcENG.rc +++ b/src/Resources/TortoiseProcENG.rc @@ -347,7 +347,7 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Icon Overlays" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - GROUPBOX "Icon Overlays/Status Columns",IDC_STATIC,12,7,274,39 + GROUPBOX "Icon Overlays",IDC_STATIC,12,7,274,39 CONTROL "Show &overlays and context menu only in explorer",IDC_ONLYEXPLORER, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,18,17,260,10 CONTROL "Unversioned files mark parent folder as modified",IDC_UNVERSIONEDASMODIFIED, diff --git a/src/TortoiseGitSetup/StructureFragment.wxi b/src/TortoiseGitSetup/StructureFragment.wxi index 353d0f135..a1f983ba1 100644 --- a/src/TortoiseGitSetup/StructureFragment.wxi +++ b/src/TortoiseGitSetup/StructureFragment.wxi @@ -72,7 +72,6 @@ - @@ -155,7 +154,6 @@ - @@ -240,7 +238,6 @@ - diff --git a/src/TortoiseShell/ColumnProvider.cpp b/src/TortoiseShell/ColumnProvider.cpp deleted file mode 100644 index cd1e30f11..000000000 --- a/src/TortoiseShell/ColumnProvider.cpp +++ /dev/null @@ -1,297 +0,0 @@ -// TortoiseGit - a Windows shell extension for easy version control - -// Copyright (C) 2003-2008,2012 - TortoiseSVN -// Copyright (C) 2008-2012 - TortoiseGit - -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software Foundation, -// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// -#include "stdafx.h" -#include "ShellExt.h" -#include "guids.h" -#include "PreserveChdir.h" -//#include "SVNProperties.h" -#include "UnicodeUtils.h" -#include "GitStatus.h" -#include "PathUtils.h" -#include "..\TGitCache\CacheInterface.h" - - -const static int ColumnFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT; - -// Defines that revision numbers occupy at most MAX_REV_STRING_LEN characters. -// There are Perforce repositories out there that have several 100,000 revs. -// So, don't be too restrictive by limiting this to 6 digits + 1 separator, -// for instance. -// -// Because shorter strings will be extended to have exactly MAX_REV_STRING_LEN -// characters, large numbers will produce large strings. These, in turn, will -// affect column auto sizing. This setting is a reasonable compromise. - -STDMETHODIMP CShellExt::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci) -{ - __try - { - return GetColumnInfo_Wrap(dwIndex, psci); - } - __except(CCrashReport::Instance().SendReport(GetExceptionInformation())) - { - } - return E_FAIL; -} - -// IColumnProvider members -STDMETHODIMP CShellExt::GetColumnInfo_Wrap(DWORD dwIndex, SHCOLUMNINFO *psci) -{ - if (psci == 0) - return E_POINTER; - - PreserveChdir preserveChdir; - if (dwIndex > 0) // TODO: keep for now to be able to hide unimplemented columns - return S_FALSE; - - ShellCache::CacheType cachetype = g_ShellCache.GetCacheType(); - if (cachetype == ShellCache::none) - return S_FALSE; - - LoadLangDll(); - switch (dwIndex) - { - case 0: // Git Status - GetColumnInfo(dwIndex, psci, 15, IDS_COLTITLESTATUS, IDS_COLDESCSTATUS); - break; - case 1: // Git Revision - GetColumnInfo(dwIndex, psci, 40, IDS_COLTITLEREV, IDS_COLDESCREV); - break; - case 2: // Git Url - GetColumnInfo(dwIndex, psci, 30, IDS_COLTITLEURL, IDS_COLDESCURL); - break; - case 3: // Git Short Url - GetColumnInfo(dwIndex, psci, 30, IDS_COLTITLESHORTURL, IDS_COLDESCSHORTURL); - break; - case 4: // Author and Git Author - psci->scid.fmtid = FMTID_SummaryInformation; // predefined FMTID - psci->scid.pid = PIDSI_AUTHOR; // Predefined - author - psci->vt = VT_LPSTR; // We'll return the data as a string - psci->fmt = LVCFMT_LEFT; // Text will be left-aligned in the column - psci->csFlags = SHCOLSTATE_TYPE_STR; // Data should be sorted as strings - psci->cChars = 32; // Default col width in chars - MAKESTRING(IDS_COLTITLEAUTHOR); - lstrcpynW(psci->wszTitle, stringtablebuffer, MAX_COLUMN_NAME_LEN); - MAKESTRING(IDS_COLDESCAUTHOR); - lstrcpynW(psci->wszDescription, stringtablebuffer, MAX_COLUMN_DESC_LEN); - break; - default: - return S_FALSE; - } - - return S_OK; -} - -void CShellExt::GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci, UINT characterCount, UINT title, UINT description) -{ - psci->scid.fmtid = CLSID_Tortoisegit_UPTODATE; - psci->scid.pid = dwIndex; - psci->vt = VT_BSTR; - psci->fmt = LVCFMT_LEFT; - psci->cChars = characterCount; - psci->csFlags = ColumnFlags; - - MAKESTRING(title); - lstrcpynW(psci->wszTitle, stringtablebuffer, MAX_COLUMN_NAME_LEN); - MAKESTRING(description); - lstrcpynW(psci->wszDescription, stringtablebuffer, MAX_COLUMN_DESC_LEN); -} - -STDMETHODIMP CShellExt::GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) -{ - __try - { - return GetItemData_Wrap(pscid, pscd, pvarData); - } - __except(CCrashReport::Instance().SendReport(GetExceptionInformation())) - { - } - return E_FAIL; -} - -STDMETHODIMP CShellExt::GetItemData_Wrap(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) -{ - if ((pscid == 0) || (pscd == 0)) - return E_INVALIDARG; - if (pvarData == 0) - return E_POINTER; - - PreserveChdir preserveChdir; - if (!g_ShellCache.IsPathAllowed((TCHAR *)pscd->wszFile)) - { - return S_FALSE; - } - LoadLangDll(); - ShellCache::CacheType cachetype = g_ShellCache.GetCacheType(); - if (pscid->fmtid == CLSID_Tortoisegit_UPTODATE) - { - stdstring szInfo; - const TCHAR * path = (TCHAR *)pscd->wszFile; - - // reserve for the path + trailing \0 - - TCHAR buf[MAX_STATUS_STRING_LENGTH+1]; - SecureZeroMemory(buf, MAX_STATUS_STRING_LENGTH); - switch (pscid->pid) - { - case 0: // Git Status - GetColumnStatus(path, pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - GitStatus::GetStatusString(g_hResInst, filestatus, buf, _countof(buf), (WORD)CRegStdDWORD(_T("Software\\TortoiseGit\\LanguageID"), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT))); - szInfo = buf; - break; - case 1: // Git Revision -#if 0 - GetColumnStatus(path, pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - if (columnrev >= 0) - { - V_VT(pvarData) = VT_I4; - V_I4(pvarData) = columnrev; - } -#endif - return S_OK; - break; - case 2: // Git Url - GetColumnStatus(path, pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - szInfo = itemurl; - break; - case 3: // Git Short Url - GetColumnStatus(path, pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - szInfo = itemshorturl; - break; - default: - return S_FALSE; - } - const WCHAR * wsInfo = szInfo.c_str(); - V_VT(pvarData) = VT_BSTR; - V_BSTR(pvarData) = SysAllocString(wsInfo); - return S_OK; - } - if (pscid->fmtid == FMTID_SummaryInformation) - { - stdstring szInfo; - const TCHAR * path = pscd->wszFile; - - if (cachetype == ShellCache::none) - return S_FALSE; - switch (pscid->pid) - { - case PIDSI_AUTHOR: // Author and Git Author - GetColumnStatus(path, pscd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); - szInfo = columnauthor; - break; - default: - return S_FALSE; - } - wide_string wsInfo = szInfo; - V_VT(pvarData) = VT_BSTR; - V_BSTR(pvarData) = SysAllocString(wsInfo.c_str()); - return S_OK; - } - - return S_FALSE; -} - -STDMETHODIMP CShellExt::Initialize(LPCSHCOLUMNINIT psci) -{ - __try - { - return Initialize_Wrap(psci); - } - __except(CCrashReport::Instance().SendReport(GetExceptionInformation())) - { - } - return E_FAIL; -} - -STDMETHODIMP CShellExt::Initialize_Wrap(LPCSHCOLUMNINIT psci) -{ - if (psci == 0) - return E_INVALIDARG; - // psci->wszFolder (WCHAR) holds the path to the folder to be displayed - // Should check to see if its a "SVN" folder and if not return E_FAIL - - PreserveChdir preserveChdir; - if (g_ShellCache.IsColumnsEveryWhere()) - return S_OK; - std::wstring path = psci->wszFolder; - if (!path.empty()) - { - if (! g_ShellCache.HasGITAdminDir(path.c_str(), TRUE)) - return E_FAIL; - } - columnfilepath = _T(""); - return S_OK; -} - -void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir) -{ - PreserveChdir preserveChdir; - if (_tcscmp(path, columnfilepath.c_str())==0) - return; - LoadLangDll(); - columnfilepath = path; - const FileStatusCacheEntry * status = NULL; - TGITCacheResponse itemStatus; - AutoLocker lock(g_csGlobalCOMGuard); - ShellCache::CacheType t = g_ShellCache.GetCacheType(); - - switch (t) - { - case ShellCache::exe: - { - SecureZeroMemory(&itemStatus, sizeof(itemStatus)); - if(m_remoteCacheLink.GetStatusFromRemoteCache(CTGitPath(path), &itemStatus, true)) - { - filestatus = GitStatus::GetMoreImportant(itemStatus.m_status.text_status, itemStatus.m_status.prop_status); - } - else - { - filestatus = git_wc_status_none; - columnauthor.clear(); - columnrev = GIT_INVALID_REVNUM; - itemurl.clear(); - itemshorturl.clear(); - return; - } - } - break; - case ShellCache::dll: - case ShellCache::dllFull: - { - status = m_CachedStatus.GetFullStatus(CTGitPath(path), bIsDir, TRUE); - filestatus = status->status; - } - break; - default: - case ShellCache::none: - { - if (g_ShellCache.HasGITAdminDir(path, bIsDir)) - filestatus = git_wc_status_normal; - else - filestatus = git_wc_status_none; - columnauthor.clear(); - columnrev = GIT_INVALID_REVNUM; - itemurl.clear(); - itemshorturl.clear(); - return; - } - break; - } -} diff --git a/src/TortoiseShell/Documentation.h b/src/TortoiseShell/Documentation.h index f925d7b38..67e491a10 100644 --- a/src/TortoiseShell/Documentation.h +++ b/src/TortoiseShell/Documentation.h @@ -343,7 +343,7 @@ * This project links to a COM object implementing all required * interfaces a shell extension needs. * The shell extension draws the overlay icons, provides the right-click menu, - * the property sheet and the SVN column (in Win2k and later). + * and the property sheet. */ /** diff --git a/src/TortoiseShell/ShellCache.h b/src/TortoiseShell/ShellCache.h index 9d2110df9..ff83c80cf 100644 --- a/src/TortoiseShell/ShellCache.h +++ b/src/TortoiseShell/ShellCache.h @@ -27,7 +27,6 @@ #define EXCLUDELISTTIMEOUT 5000 #define ADMINDIRTIMEOUT 10000 #define DRIVETYPETIMEOUT 300000 // 5 min -#define NUMBERFMTTIMEOUT 300000 #define MENUTIMEOUT 100 #define DEFAULTMENUTOPENTRIES MENUSYNC|MENUCREATEREPOS|MENUCLONE|MENUCOMMIT @@ -78,7 +77,6 @@ public: driveticker = cachetypeticker; drivetypeticker = cachetypeticker; langticker = cachetypeticker; - columnrevformatticker = cachetypeticker; excludelistticker = cachetypeticker; includelistticker = cachetypeticker; simplecontextticker = cachetypeticker; @@ -87,7 +85,6 @@ public: showunversionedoverlayticker = cachetypeticker; showignoredoverlayticker = cachetypeticker; admindirticker = cachetypeticker; - columnseverywhereticker = cachetypeticker; getlocktopticker = cachetypeticker; excludedasnormalticker = cachetypeticker; hidemenusforunversioneditemsticker = cachetypeticker; @@ -111,7 +108,6 @@ public: langid = CRegStdDWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033); blockstatus = CRegStdDWORD(_T("Software\\TortoiseGit\\BlockStatus"), 0); blockstatusticker = cachetypeticker; - columnseverywhere = CRegStdDWORD(_T("Software\\TortoiseGit\\ColumnsEveryWhere"), FALSE); for (int i = 0; i < 27; ++i) { drivetypecache[i] = (UINT)-1; @@ -121,16 +117,10 @@ public: drivetypecache[1] = DRIVE_REMOVABLE; drivetypepathcache[0] = 0; TCHAR szBuffer[5]; - columnrevformatticker = GetTickCount(); - SecureZeroMemory(&columnrevformat, sizeof(NUMBERFMT)); GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, &szDecSep[0], _countof(szDecSep)); GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, &szThousandsSep[0], _countof(szThousandsSep)); - columnrevformat.lpDecimalSep = szDecSep; - columnrevformat.lpThousandSep = szThousandsSep; GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &szBuffer[0], _countof(szBuffer)); - columnrevformat.Grouping = _ttoi(szBuffer); GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_INEGNUMBER, &szBuffer[0], _countof(szBuffer)); - columnrevformat.NegativeOrder = _ttoi(szBuffer); sAdminDirCacheKey.reserve(MAX_PATH); // MAX_PATH as buffer reservation ok. nocontextpaths = CRegStdString(_T("Software\\TortoiseGit\\NoContextPaths"), _T("")); m_critSec.Init(); @@ -160,7 +150,6 @@ public: menulayouthigh.read(); langid.read(); blockstatus.read(); - columnseverywhere.read(); getlocktop.read(); menumasklow_lm.read(); menumaskhigh_lm.read(); @@ -473,24 +462,6 @@ public: } return (langid); } - NUMBERFMT * GetNumberFmt() - { - if ((GetTickCount() - NUMBERFMTTIMEOUT) > columnrevformatticker) - { - TCHAR szBuffer[5]; - columnrevformatticker = GetTickCount(); - SecureZeroMemory(&columnrevformat, sizeof(NUMBERFMT)); - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, &szDecSep[0], _countof(szDecSep)); - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, &szThousandsSep[0], _countof(szThousandsSep)); - columnrevformat.lpDecimalSep = szDecSep; - columnrevformat.lpThousandSep = szThousandsSep; - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &szBuffer[0], _countof(szBuffer)); - columnrevformat.Grouping = _ttoi(szBuffer); - GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_INEGNUMBER, &szBuffer[0], _countof(szBuffer)); - columnrevformat.NegativeOrder = _ttoi(szBuffer); - } - return &columnrevformat; - } BOOL HasGITAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL) { size_t len = _tcslen(path); @@ -532,15 +503,6 @@ public: return hasAdminDir; } - bool IsColumnsEveryWhere() - { - if ((GetTickCount() - REGISTRYTIMEOUT) > columnseverywhereticker) - { - columnseverywhereticker = GetTickCount(); - columnseverywhere.read(); - } - return !!(DWORD)columnseverywhere; - } private: void DriveValid() { @@ -671,7 +633,6 @@ public: CRegStdDWORD excludedasnormal; CRegStdString excludelist; CRegStdDWORD hidemenusforunversioneditems; - CRegStdDWORD columnseverywhere; stdstring excludeliststr; std::vector exvector; CRegStdString includelist; @@ -688,7 +649,6 @@ public: DWORD menumaskticker; DWORD langticker; DWORD blockstatusticker; - DWORD columnrevformatticker; DWORD excludelistticker; DWORD includelistticker; DWORD simplecontextticker; @@ -698,10 +658,8 @@ public: DWORD showignoredoverlayticker; DWORD excludedasnormalticker; DWORD hidemenusforunversioneditemsticker; - DWORD columnseverywhereticker; UINT drivetypecache[27]; TCHAR drivetypepathcache[MAX_PATH]; // MAX_PATH ok. - NUMBERFMT columnrevformat; TCHAR szDecSep[5]; TCHAR szThousandsSep[5]; std::map admindircache; diff --git a/src/TortoiseShell/ShellExt.cpp b/src/TortoiseShell/ShellExt.cpp index 2adc04db1..0eb52d463 100644 --- a/src/TortoiseShell/ShellExt.cpp +++ b/src/TortoiseShell/ShellExt.cpp @@ -228,10 +228,6 @@ STDMETHODIMP CShellExt::QueryInterface(REFIID riid, LPVOID FAR *ppv) { *ppv = static_cast(this); } - else if (IsEqualIID(riid, IID_IColumnProvider)) - { - *ppv = static_cast(this); - } else if (IsEqualIID(riid, IID_IShellCopyHook)) { *ppv = static_cast(this); diff --git a/src/TortoiseShell/ShellExt.h b/src/TortoiseShell/ShellExt.h index 153a97e02..977462931 100644 --- a/src/TortoiseShell/ShellExt.h +++ b/src/TortoiseShell/ShellExt.h @@ -66,16 +66,11 @@ typedef CComCritSecLock AutoLocker; */ class CShellExt : public IContextMenu3, IPersistFile, - IColumnProvider, IShellExtInit, IShellIconOverlayIdentifier, IShellPropSheetExt, ICopyHookW -// COMPILER ERROR? You need the latest version of the -// platform SDK which has references to IColumnProvider -// in the header files. Download it here: -// http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ { protected: @@ -94,13 +89,7 @@ protected: stdstring uuidTarget; int space; TCHAR stringtablebuffer[255]; - stdstring columnfilepath; ///< holds the last file/dir path for the column provider - stdstring columnauthor; ///< holds the corresponding author of the file/dir above - stdstring itemurl; - stdstring itemshorturl; stdstring ignoredprops; - git_revnum_t columnrev; ///< holds the corresponding revision to the file/dir above - git_wc_status_kind filestatus; CRegStdString regDiffLater; GitFolderStatus m_CachedStatus; // status cache @@ -118,8 +107,6 @@ private: stdstring WriteFileListToTempFile(); bool WriteClipboardPathsToTempFile(stdstring& tempfile); LPCTSTR GetMenuTextFromResource(int id); - void GetColumnStatus(const TCHAR * path, BOOL bIsDir); - void GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci, UINT characterCount, UINT title, UINT description); bool ShouldInsertItem(const MenuInfo& pair) const; bool ShouldEnableMenu(const YesNoPair& pair) const; void TweakMenu(HMENU menu); @@ -147,15 +134,6 @@ private: STDMETHODIMP HandleMenuMsg2_Wrap(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult); //@} - /** \name IColumnProvider wrappers - * IColumnProvider wrapper functions to catch exceptions and send crash reports - */ - //@{ - STDMETHODIMP GetColumnInfo_Wrap(DWORD dwIndex, SHCOLUMNINFO *psci); - STDMETHODIMP GetItemData_Wrap(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData); - STDMETHODIMP Initialize_Wrap(LPCSHCOLUMNINIT psci); - //@} - /** \name IShellExtInit wrappers * IShellExtInit wrapper functions to catch exceptions and send crash reports */ @@ -217,15 +195,6 @@ public: STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult); //@} - /** \name IColumnProvider - * IColumnProvider members - */ - //@{ - STDMETHODIMP GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci); - STDMETHODIMP GetItemData(LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData); - STDMETHODIMP Initialize(LPCSHCOLUMNINIT psci); - //@} - /** \name IShellExtInit * IShellExtInit methods */ diff --git a/src/TortoiseShell/TortoiseShell.vcxproj b/src/TortoiseShell/TortoiseShell.vcxproj index abfee39d9..6b9d3b0b6 100644 --- a/src/TortoiseShell/TortoiseShell.vcxproj +++ b/src/TortoiseShell/TortoiseShell.vcxproj @@ -144,7 +144,6 @@ - diff --git a/src/TortoiseShell/TortoiseShell.vcxproj.filters b/src/TortoiseShell/TortoiseShell.vcxproj.filters index a7ba1ab58..10f94501d 100644 --- a/src/TortoiseShell/TortoiseShell.vcxproj.filters +++ b/src/TortoiseShell/TortoiseShell.vcxproj.filters @@ -18,9 +18,6 @@ Source Files - - Source Files - Source Files diff --git a/src/TortoiseShell/deregister.reg b/src/TortoiseShell/deregister.reg index b3ff18a90..6bac5f9a1 100644 --- a/src/TortoiseShell/deregister.reg +++ b/src/TortoiseShell/deregister.reg @@ -112,8 +112,6 @@ REGEDIT4 [-HKEY_CLASSES_ROOT\InternetShortcut\shellex\ContextMenuHandlers\TortoiseGit] -[-HKEY_CLASSES_ROOT\Folder\shellex\ColumnHandlers\{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}] - [-HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\TortoiseGit] diff --git a/src/TortoiseShell/register.registry b/src/TortoiseShell/register.registry index 261728ba1..ba03f1f04 100644 --- a/src/TortoiseShell/register.registry +++ b/src/TortoiseShell/register.registry @@ -234,8 +234,6 @@ REGEDIT4 [HKEY_CLASSES_ROOT\InternetShortcut\shellex\ContextMenuHandlers\TortoiseGit] @="{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}" -[HKEY_CLASSES_ROOT\Folder\shellex\ColumnHandlers\{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}] - [HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\TortoiseGit] @="{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}" diff --git a/src/TortoiseShell/register_recover.registry b/src/TortoiseShell/register_recover.registry index fc3d59c2e..4c0709ba0 100644 --- a/src/TortoiseShell/register_recover.registry +++ b/src/TortoiseShell/register_recover.registry @@ -234,8 +234,6 @@ REGEDIT4 [HKEY_CLASSES_ROOT\InternetShortcut\shellex\ContextMenuHandlers\TortoiseGit] @="{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}" -[HKEY_CLASSES_ROOT\Folder\shellex\ColumnHandlers\{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}] - [HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\TortoiseGit] @="{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}" diff --git a/src/TortoiseShell/registerrelease.registry b/src/TortoiseShell/registerrelease.registry index b28dd8da7..51e09ad08 100644 --- a/src/TortoiseShell/registerrelease.registry +++ b/src/TortoiseShell/registerrelease.registry @@ -234,8 +234,6 @@ REGEDIT4 [HKEY_CLASSES_ROOT\InternetShortcut\shellex\ContextMenuHandlers\TortoiseGit] @="{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}" -[HKEY_CLASSES_ROOT\Folder\shellex\ColumnHandlers\{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}] - [HKEY_CLASSES_ROOT\Directory\shellex\CopyHookHandlers\TortoiseGit] @="{10A0FDD2-B0C0-4cd4-A7AE-E594CE3B91C8}" diff --git a/src/TortoiseShell/resource.h b/src/TortoiseShell/resource.h index 4d5b4338a..6c7b9c861 100644 --- a/src/TortoiseShell/resource.h +++ b/src/TortoiseShell/resource.h @@ -82,20 +82,12 @@ #define IDS_MENUUPDATEEXT 170 #define IDS_MENUDESCUPDATEEXT 171 #define IDS_MENUBISECTRESET 171 -#define IDS_COLTITLESTATUS 172 -#define IDS_COLDESCSTATUS 173 -#define IDS_COLTITLEREV 174 -#define IDS_COLDESCREV 175 #define IDS_MENUDIFF 176 #define IDS_MENUDESCDIFF 177 #define IDS_DROPCOPYADDMENU 178 #define IDS_DROPMOVEMENU 179 #define IDS_MENULOG 180 #define IDS_MENUDESCLOG 181 -#define IDS_COLTITLEURL 182 -#define IDS_COLDESCURL 183 -#define IDS_COLTITLESHORTURL 184 -#define IDS_COLDESCSHORTURL 185 #define IDS_MENUCONFLICT 186 #define IDS_MENUDESCCONFLICT 187 #define IDS_MENUDESCBISECTSTART 188 @@ -148,8 +140,6 @@ #define IDS_MENUUNIGNORE 237 #define IDS_MENUDESCUNIGNORE 238 #define IDS_DROPCOPYRENAMEMENU 250 -#define IDS_COLTITLEAUTHOR 251 -#define IDS_COLDESCAUTHOR 252 #define IDS_FILEPROPONFOLDER 253 #define IDS_PROPSNOTSAVED 254 #define IDS_DROPMOVERENAMEMENU 256 diff --git a/src/TortoiseShell/resourceshell.rc b/src/TortoiseShell/resourceshell.rc index 86fc1c9fc..09b2c9f57 100644 --- a/src/TortoiseShell/resourceshell.rc +++ b/src/TortoiseShell/resourceshell.rc @@ -324,10 +324,6 @@ BEGIN IDS_MENUDESCREMOVE "Deletes files/folders from version control" IDS_MENUUPDATEEXT "Submodule &Update..." IDS_MENUBISECTRESET "Bisect reset" - IDS_COLTITLESTATUS "Git Status" - IDS_COLDESCSTATUS "Status of item in Git" - IDS_COLTITLEREV "Git Revision" - IDS_COLDESCREV "Last saved revision of item" END STRINGTABLE @@ -375,10 +371,6 @@ BEGIN IDS_DROPMOVEMENU "Git Move versioned item(s) here" IDS_MENULOG "Show &log" IDS_MENUDESCLOG "Shows the log for the selected file/folder" - IDS_COLTITLEURL "Git URL" - IDS_COLDESCURL "URL of Git items" - IDS_COLTITLESHORTURL "Git short URL" - IDS_COLDESCSHORTURL "Short URL of Git items" IDS_MENUCONFLICT "&Edit conflicts" IDS_MENUDESCCONFLICT "Launches the external diff/merge program to solve the conflicts" IDS_MENUDESCBISECTSTART "Start bisect mode..." @@ -416,8 +408,6 @@ END STRINGTABLE BEGIN IDS_DROPCOPYRENAMEMENU "Git Copy and rename versioned item here" - IDS_COLTITLEAUTHOR "Git Author" - IDS_COLDESCAUTHOR "The user who did the last commit" IDS_FILEPROPONFOLDER "You can't set this property on folders, only on files!\nIf you want to set it on all files within that folder,\nyou must activate the 'recursive' checkbox." IDS_PROPSNOTSAVED "You have modified properties without saving them first.\nDo you want to save them now?" END -- 2.11.4.GIT