}
}
+
+void Refresh()
+{
+
+}
+
BOOL CGitLogList::GetShortName(CString ref, CString &shortname,CString prefix)
{
if(ref.Left(prefix.GetLength()) == prefix)
bool bOutOfRange = pItem->iItem >= ShownCountWithStopped();
*pResult = 0;
- if (m_bNoDispUpdates || m_bThreadRunning || bOutOfRange)
+ if (m_bNoDispUpdates || bOutOfRange)
return;
// Which item number?
m_ProcCallBack(m_ProcData,GITLOG_START);
InterlockedExchange(&m_bThreadRunning, TRUE);
+ InterlockedExchange(&m_bNoDispUpdates, TRUE);
//does the user force the cache to refresh (shift or control key down)?
bool refresh = (GetKeyState (VK_CONTROL) < 0)
FillGitShortLog();
- InterlockedExchange(&m_bThreadRunning, FALSE);
+
RedrawItems(0, m_arShownList.GetCount());
SetRedraw(false);
if(m_ProcCallBack)
m_ProcCallBack(m_ProcData,GITLOG_END);
+ InterlockedExchange(&m_bThreadRunning, FALSE);
+
return 0;
}
+void CGitLogList::Refresh()
+{
+ if(!m_bThreadRunning)
+ {
+ this->SetItemCountEx(0);
+ m_logEntries.clear();
+ InterlockedExchange(&m_bThreadRunning, TRUE);
+ InterlockedExchange(&m_bNoDispUpdates, TRUE);
+ if (AfxBeginThread(LogThreadEntry, this)==NULL)
+ {
+ InterlockedExchange(&m_bThreadRunning, FALSE);
+ InterlockedExchange(&m_bNoDispUpdates, FALSE);
+ CMessageBox::Show(NULL, IDS_ERR_THREADSTARTFAILED, IDS_APPNAME, MB_OK | MB_ICONERROR);
+ }
+ }
+}