m_arStatusArray.clear();\r
#endif\r
}\r
-\r
+#if 0\r
CGitStatusListCtrl::FileEntry * CGitStatusListCtrl::GetListEntry(UINT_PTR index)\r
{\r
-#if 0\r
+\r
if (index >= (UINT_PTR)m_arListArray.size())\r
return NULL;\r
if (m_arListArray[index] >= m_arStatusArray.size())\r
return NULL;\r
return m_arStatusArray[m_arListArray[index]];\r
-#endif\r
+\r
return NULL;\r
}\r
-\r
+#endif\r
+#if 0\r
CGitStatusListCtrl::FileEntry * CGitStatusListCtrl::GetVisibleListEntry(const CTGitPath& path)\r
{\r
int itemCount = GetItemCount();\r
}\r
return NULL;\r
}\r
-\r
+#endif\r
+#if 0\r
CGitStatusListCtrl::FileEntry * CGitStatusListCtrl::GetListEntry(const CTGitPath& path)\r
{\r
-#if 0\r
+\r
for (size_t i=0; i < m_arStatusArray.size(); i++)\r
{\r
FileEntry * entry = m_arStatusArray[i];\r
if (entry->GetPath().IsEquivalentTo(path))\r
return entry;\r
}\r
-#endif\r
+\r
return NULL;\r
}\r
+#endif\r
\r
+#if 0\r
int CGitStatusListCtrl::GetIndex(const CTGitPath& path)\r
{\r
int itemCount = GetItemCount();\r
}\r
return -1;\r
}\r
+#endif \r
\r
void CGitStatusListCtrl::Init(DWORD dwColumns, const CString& sColumnInfoContainer, DWORD dwContextMenus /* = GitSLC_POPALL */, bool bHasCheckboxes /* = true */)\r
{\r
#endif\r
return true;\r
}\r
-\r
+#if 0\r
const CGitStatusListCtrl::FileEntry*\r
CGitStatusListCtrl::AddNewFileEntry(\r
const git_wc_status2_t* pGitStatus, // The return from the Git GetStatus functions\r
)\r
{\r
FileEntry * entry = new FileEntry();\r
-#if 0\r
+\r
\r
entry->path = path;\r
entry->basepath = basePath;\r
\r
// Pass ownership of the entry to the array\r
m_arStatusArray.push_back(entry);\r
-#endif\r
+\r
return entry;\r
}\r
+#endif\r
\r
void CGitStatusListCtrl::AddUnversionedFolder(const CTGitPath& folderName,\r
const CTGitPath& basePath,\r
m_nSelected--;\r
}\r
}\r
-\r
+#if 0\r
bool CGitStatusListCtrl::EntryPathCompareNoCase(const FileEntry* pEntry1, const FileEntry* pEntry2)\r
{\r
return pEntry1->path < pEntry2->path;\r
{\r
return pEntry1->status != git_wc_status_unversioned;\r
}\r
-\r
+#endif\r
bool CGitStatusListCtrl::BuildStatistics()\r
{\r
#if 0\r
lv.mask = LVIF_GROUPID;\r
lv.iItem = i;\r
GetItem(&lv);\r
+#if 0\r
if (lv.iGroupId == group)\r
{\r
FileEntry * entry = GetListEntry(i);\r
}\r
}\r
}\r
+#endif\r
}\r
GetStatisticsString();\r
NotifyCheck();\r
*pResult = 0;\r
if (m_bBlock)\r
return;\r
+#if 0\r
if (GetListEntry(pGetInfoTip->iItem >= 0))\r
if (pGetInfoTip->cchTextMax > GetListEntry(pGetInfoTip->iItem)->path.GetGitPathString().GetLength())\r
{\r
else if (GetStringWidth(GetListEntry(pGetInfoTip->iItem)->path.GetGitPathString()) > GetColumnWidth(pGetInfoTip->iItem))\r
_tcsncpy_s(pGetInfoTip->pszText, pGetInfoTip->cchTextMax, GetListEntry(pGetInfoTip->iItem)->path.GetGitPathString(), pGetInfoTip->cchTextMax);\r
}\r
+#endif\r
}\r
\r
void CGitStatusListCtrl::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)\r
\r
if (m_arListArray.size() > (DWORD_PTR)pLVCD->nmcd.dwItemSpec)\r
{\r
+#if 0\r
FileEntry * entry = GetListEntry((int)pLVCD->nmcd.dwItemSpec);\r
if (entry == NULL)\r
return;\r
\r
if (entry->isConflicted)\r
crText = m_Colors.GetColor(CColors::Conflict);\r
-\r
+#endif\r
// Store the color back in the NMLVCUSTOMDRAW struct.\r
pLVCD->clrText = crText;\r
}\r
SetCheck(listboxIndex, bCheck);\r
}\r
\r
-\r
+#if 0\r
void CGitStatusListCtrl::SetCheckOnAllDescendentsOf(const FileEntry* parentEntry, bool bCheck)\r
{\r
-#if 0\r
+\r
int nListItems = GetItemCount();\r
for (int j=0; j< nListItems ; ++j)\r
{\r
}\r
}\r
}\r
-#endif\r
+\r
}\r
+#endif\r
\r
void CGitStatusListCtrl::WriteCheckedNamesToPathList(CTGitPathList& pathList)\r
{\r
+#if 0\r
pathList.Clear();\r
int nListItems = GetItemCount();\r
for (int i=0; i< nListItems; i++)\r
}\r
}\r
pathList.SortByPathname();\r
+#endif\r
}\r
\r
\r
\r
bool CGitStatusListCtrl::IsPathShown(const CTGitPath& path)\r
{\r
+#if 0\r
int itemCount = GetItemCount();\r
for (int i=0; i < itemCount; i++)\r
{\r
if (entry->GetPath().IsEquivalentTo(path))\r
return true;\r
}\r
+#endif\r
return false;\r
}\r
\r
\r
size_t CGitStatusListCtrl::GetNumberOfChangelistsInSelection()\r
{\r
+#if 0\r
std::set<CString> changelists;\r
POSITION pos = GetFirstSelectedItemPosition();\r
int index;\r
changelists.insert(entry->changelist);\r
}\r
return changelists.size();\r
+#endif \r
+ return 0;\r
}\r
\r
bool CGitStatusListCtrl::PrepareGroups(bool bForce /* = false */)\r
typedef int (__cdecl *GENERICCOMPAREFN)(const void * elem1, const void * elem2);\r
typedef CComCritSecLock<CComCriticalSection> Locker;\r
\r
+class CGitStatusListCtrlDropTarget;\r
/**\r
* \ingroup SVN\r
* A List control, based on the MFC CListCtrl which shows a list of\r
* Helper class for CGitStatusListCtrl which represents\r
* the data for each file shown.\r
*/\r
-\r
+#if 0\r
class FileEntry\r
{\r
public:\r
friend class CGitStatusListCtrlDropTarget;\r
friend class CSorter;\r
};\r
+#endif\r
/**\r
* \ingroup TortoiseProc\r
* Helper class for CGitStatusListCtrl that represents\r
/// call these to update the user-prop list\r
/// (will also auto-insert /-remove new list columns)\r
\r
- void UpdateUserPropList (const std::vector<FileEntry*>& files);\r
- void UpdateRelevance ( const std::vector<FileEntry*>& files\r
- , const std::vector<size_t>& visibleFiles);\r
+ //void UpdateUserPropList (const std::vector<FileEntry*>& files);\r
+ //void UpdateRelevance ( const std::vector<FileEntry*>& files\r
+ // , const std::vector<size_t>& visibleFiles);\r
\r
/// don't clutter the context menu with irrelevant prop info\r
\r
/**\r
* Returns the file entry data for the list control index.\r
*/\r
- CGitStatusListCtrl::FileEntry * GetListEntry(UINT_PTR index);\r
+ //CGitStatusListCtrl::FileEntry * GetListEntry(UINT_PTR index);\r
\r
/**\r
* Returns the file entry data for the specified path.\r
* \note The entry might not be shown in the list control.\r
*/\r
- CGitStatusListCtrl::FileEntry * GetListEntry(const CTGitPath& path);\r
+ //CGitStatusListCtrl::FileEntry * GetListEntry(const CTGitPath& path);\r
\r
/**\r
* Returns the index of the list control entry with the specified path,\r
/**\r
* Returns the file entry data for the specified path in the list control.\r
*/\r
- CGitStatusListCtrl::FileEntry * GetVisibleListEntry(const CTGitPath& path);\r
+ //CGitStatusListCtrl::FileEntry * GetVisibleListEntry(const CTGitPath& path);\r
\r
/**\r
* Returns a String containing some statistics like number of modified, normal, deleted,...\r
private:\r
void SaveColumnWidths(bool bSaveToRegistry = false);\r
void Sort(); ///< Sorts the control by columns\r
- void AddEntry(FileEntry * entry, WORD langID, int listIndex); ///< add an entry to the control\r
+ //void AddEntry(FileEntry * entry, WORD langID, int listIndex); ///< add an entry to the control\r
void RemoveListEntry(int index); ///< removes an entry from the listcontrol and both arrays\r
bool BuildStatistics(); ///< build the statistics and correct the case of files/folders\r
void StartDiff(int fileindex); ///< start the external diff program\r
void ClearStatusArray();\r
\r
/// Sort predicate function - Compare the paths of two entries without regard to case\r
- static bool EntryPathCompareNoCase(const FileEntry* pEntry1, const FileEntry* pEntry2);\r
+ //static bool EntryPathCompareNoCase(const FileEntry* pEntry1, const FileEntry* pEntry2);\r
\r
/// Predicate used to build a list of only the versioned entries of the FileEntry array\r
- static bool IsEntryVersioned(const FileEntry* pEntry1);\r
+ //static bool IsEntryVersioned(const FileEntry* pEntry1);\r
\r
/// Look up the relevant show flags for a particular Git status value\r
DWORD GetShowFlagsFromGitStatus(git_wc_status_kind status);\r
\r
/// Build a FileEntry item and add it to the FileEntry array\r
- const FileEntry* AddNewFileEntry(\r
- const git_wc_status2_t* pGitStatus, // The return from the Git GetStatus functions\r
- const CTGitPath& path, // The path of the item we're adding\r
- const CTGitPath& basePath, // The base directory for this status build\r
- bool bDirectItem, // Was this item the first found by GetFirstFileStatus or by a subsequent GetNextFileStatus call\r
- bool bInExternal, // Are we in an 'external' folder\r
- bool bEntryfromDifferentRepo // if the entry is from a different repository\r
- );\r
+ //const FileEntry* AddNewFileEntry(\r
+ // const git_wc_status2_t* pGitStatus, // The return from the Git GetStatus functions\r
+ // const CTGitPath& path, // The path of the item we're adding\r
+ // const CTGitPath& basePath, // The base directory for this status build\r
+ // bool bDirectItem, // Was this item the first found by GetFirstFileStatus or by a subsequent GetNextFileStatus call\r
+ // bool bInExternal, // Are we in an 'external' folder\r
+ // bool bEntryfromDifferentRepo // if the entry is from a different repository\r
+ // );\r
\r
/// Adjust the checkbox-state on all descendants of a specific item\r
- void SetCheckOnAllDescendentsOf(const FileEntry* parentEntry, bool bCheck);\r
+ //void SetCheckOnAllDescendentsOf(const FileEntry* parentEntry, bool bCheck);\r
\r
/// Build a path list of all the selected items in the list (NOTE - SELECTED, not CHECKED)\r
void FillListOfSelectedItemPaths(CTGitPathList& pathList, bool bNoIgnored = false);\r
\r
// call these to update the user-prop list\r
// (will also auto-insert /-remove new list columns)\r
-\r
+#if 0\r
void CGitStatusListCtrl::ColumnManager::UpdateUserPropList \r
(const std::vector<FileEntry*>& files)\r
{\r
// collect all user-defined props\r
-#if 0\r
+\r
std::set<CString> aggregatedProps;\r
for (size_t i = 0, count = files.size(); i < count; ++i)\r
files[i]->present_props.GetPropertyNames (aggregatedProps);\r
\r
ApplyColumnOrder();\r
\r
-#endif\r
-}\r
\r
+}\r
+#endif\r
+#if 0\r
void CGitStatusListCtrl::ColumnManager::UpdateRelevance \r
( const std::vector<FileEntry*>& files\r
, const std::vector<size_t>& visibleFiles)\r
{\r
// collect all user-defined props that belong to shown files\r
-#if 0\r
+\r
std::set<CString> aggregatedProps;\r
for (size_t i = 0, count = visibleFiles.size(); i < count; ++i)\r
files[visibleFiles[i]]->present_props.GetPropertyNames (aggregatedProps);\r
columns[i].relevant \r
= aggregatedProps.find (GetName(i)) != aggregatedProps.end();\r
}\r
-#endif\r
-}\r
\r
+}\r
+#endif\r
// don't clutter the context menu with irrelevant prop info\r
\r
bool CGitStatusListCtrl::ColumnManager::AnyUnusedProperties() const\r