\r
CRefLogList::CRefLogList()\r
{\r
+ m_ColumnRegKey=_T("reflog");\r
\r
}\r
\r
SetRedraw(false);\r
ResizeAllListCtrlCols();\r
SetRedraw(true);\r
+}\r
+\r
+void CRefLogList::OnLvnGetdispinfoLoglist(NMHDR *pNMHDR, LRESULT *pResult)\r
+{\r
+ NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);\r
+\r
+ // Create a pointer to the item\r
+ LV_ITEM* pItem = &(pDispInfo)->item;\r
+\r
+ // Do the list need text information?\r
+ if (!(pItem->mask & LVIF_TEXT))\r
+ return;\r
+\r
+ // By default, clear text buffer.\r
+ lstrcpyn(pItem->pszText, _T(""), pItem->cchTextMax);\r
+\r
+ bool bOutOfRange = pItem->iItem >= ShownCountWithStopped();\r
+ \r
+ *pResult = 0;\r
+ if (m_bNoDispUpdates || bOutOfRange)\r
+ return;\r
+\r
+ // Which item number?\r
+ int itemid = pItem->iItem;\r
+ GitRev * pLogEntry = NULL;\r
+ if (itemid < m_arShownList.GetCount())\r
+ pLogEntry = reinterpret_cast<GitRev*>(m_arShownList.GetAt(pItem->iItem));\r
+\r
+ CString temp;\r
+ \r
+ // Which column?\r
+ switch (pItem->iSubItem)\r
+ {\r
+ case this->REFLOG_HASH: //Graphic\r
+ if (pLogEntry)\r
+ {\r
+ lstrcpyn(pItem->pszText,pLogEntry->m_CommitHash, pItem->cchTextMax);\r
+ }\r
+ break;\r
+ case REFLOG_REF: //action -- no text in the column\r
+ if(pLogEntry)\r
+ lstrcpyn(pItem->pszText, pLogEntry->m_Ref, pItem->cchTextMax);\r
+ break;\r
+ case REFLOG_ACTION: //Message\r
+ if (pLogEntry)\r
+ lstrcpyn(pItem->pszText, (LPCTSTR)pLogEntry->m_RefAction, pItem->cchTextMax);\r
+ break;\r
+ case REFLOG_MESSAGE: //Author\r
+ if (pLogEntry)\r
+ lstrcpyn(pItem->pszText, (LPCTSTR)pLogEntry->m_Subject, pItem->cchTextMax);\r
+ break;\r
+ \r
+ default:\r
+ ASSERT(false);\r
+ }\r
+}\r
+\r
+void CRefLogList::OnNMCustomdrawLoglist(NMHDR *pNMHDR, LRESULT *pResult)\r
+{\r
+\r
+ NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );\r
+ // Take the default processing unless we set this to something else below.\r
+ *pResult = CDRF_DODEFAULT;\r
}
\ No newline at end of file