\r
if(this->m_bExitThread)\r
return 0;\r
-\r
+#if 0\r
RedrawItems(0, m_arShownList.GetCount());\r
- SetRedraw(false);\r
- ResizeAllListCtrlCols();\r
- SetRedraw(true);\r
+ // SetRedraw(false);\r
+ // ResizeAllListCtrlCols();\r
+ // SetRedraw(true);\r
\r
if ( m_pStoreSelection )\r
{\r
\r
void CGitLogListBase::OnDestroy()\r
{\r
+ // save the column widths to the registry\r
+ SaveColumnWidths();\r
++\r
+ if(this->m_bThreadRunning)\r
+ {\r
+ this->m_bExitThread=true;\r
+ DWORD ret =::WaitForSingleObject(m_LoadingThread->m_hThread,20000);\r
+ if(ret == WAIT_TIMEOUT)\r
+ TerminateThread();\r
+ }\r
while(m_LogCache.SaveCache())\r
{\r
- if(CMessageBox::Show(NULL,_T("Can Save Log Cache to Disk,click yes for retry, click no for give up"),_T("TortoiseGit"),\r
+ if(CMessageBox::Show(NULL,_T("Cannot Save Log Cache to Disk,click yes for retry, click no for give up"),_T("TortoiseGit"),\r
MB_YESNO) == IDNO)\r
break;\r
}\r
CHintListCtrl::OnDestroy();\r
}\r
\r
-}
+LRESULT CGitLogListBase::OnLoad(WPARAM wParam,LPARAM lParam)\r
+{\r
+ CRect rect;\r
+ int i=(int)wParam;\r
+ this->GetItemRect(i,&rect,LVIR_BOUNDS);\r
+ this->InvalidateRect(rect);\r
+ return 0;\r
+}\r
++\r
+ /**\r
+ * Save column widths to the registry\r
+ */\r
+ void CGitLogListBase::SaveColumnWidths()\r
+ {\r
+ CHeaderCtrl* pHdrCtrl = (CHeaderCtrl*)(GetDlgItem(0));\r
+ if (pHdrCtrl)\r
+ {\r
+ int numcols = pHdrCtrl->GetItemCount();\r
+ for (int col = 0; col < numcols; col++)\r
+ {\r
+ int width = GetColumnWidth( col );\r
+ CString regentry;\r
+ regentry.Format( _T("Software\\TortoiseGit\\log\\ColWidth%d"), col);\r
+ CRegDWORD regwidth(regentry, 0);\r
+ regwidth = width; // this writes it to reg\r
+ }\r
+ }\r
++}\r