Ticket #347: boincmgr_347.patch
File boincmgr_347.patch, 5.6 KB (added by , 17 years ago) |
---|
-
../clientgui/BOINCBaseView.cpp
24 24 #include "stdwx.h" 25 25 #include "BOINCGUIApp.h" 26 26 #include "MainDocument.h" 27 #include "BOINCBaseFrame.h" 28 #include "AdvancedFrame.h" 27 29 #include "BOINCBaseView.h" 28 30 #include "BOINCTaskCtrl.h" 29 31 #include "BOINCListCtrl.h" … … 533 535 return false; 534 536 } 535 537 538 void CBOINCBaseView::UpdateRefreshTimer(const int rowCount) { 539 CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame); 536 540 541 wxASSERT(pFrame); 542 wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame)); 543 544 int newInterval; 545 if (rowCount <= 10) { 546 newInterval = 1000; 547 } else if (rowCount <= 300) { 548 newInterval = 100 * rowCount; 549 } else { 550 newInterval = 30000; 551 } 552 553 pFrame->UpdateListPanelRenderTimerInterval(GetViewRefreshRate() * newInterval); 554 } 555 556 537 557 void CBOINCBaseView::append_to_status(wxString& existing, const wxChar* additional) { 538 558 if (existing.size() == 0) { 539 559 existing = additional; -
../clientgui/BOINCBaseView.h
146 146 bool _EnsureLastItemVisible(); 147 147 virtual bool EnsureLastItemVisible(); 148 148 149 virtual void UpdateRefreshTimer(const int rowCount); 150 149 151 static void append_to_status(wxString& existing, const wxChar* additional); 150 152 static wxString HtmlEntityEncode(wxString strRaw); 151 153 static wxString HtmlEntityDecode(wxString strRaw); -
../clientgui/ViewMessagesGrid.cpp
281 281 if ( m_pGridPane->GetNumberRows() ) { 282 282 m_pGridPane->DeleteRows(0, m_pGridPane->GetNumberRows()); 283 283 } 284 UpdateRefreshTimer(0); 284 285 return; 285 286 } 286 287 … … 298 299 //update cell values (unsorted, like delivered from core client) 299 300 wxString strBuffer; 300 301 int iMax = m_pGridPane->GetNumberRows(); 302 UpdateRefreshTimer(iMax); 301 303 for(int iRow = 0; iRow < iMax; iRow++) { 302 304 303 305 FormatProjectName(iRow, strBuffer); -
../clientgui/ViewProjectsGrid.cpp
740 740 if ( m_pGridPane->GetNumberRows() ) { 741 741 m_pGridPane->DeleteRows(0, m_pGridPane->GetNumberRows()); 742 742 } 743 UpdateRefreshTimer(0); 743 744 return; 744 745 } 745 746 … … 756 757 757 758 wxString strBuffer; 758 759 int iMax = m_pGridPane->GetNumberRows(); 760 UpdateRefreshTimer(iMax); 759 761 for(int iRow = 0; iRow < iMax; iRow++) { 760 762 761 763 FormatProjectName(iRow, strBuffer); -
../clientgui/ViewTransfersGrid.cpp
476 476 if ( m_pGridPane->GetNumberRows() ) { 477 477 m_pGridPane->DeleteRows(0, m_pGridPane->GetNumberRows()); 478 478 } 479 UpdateRefreshTimer(0); 479 480 return; 480 481 } 481 482 … … 493 494 //update cell values 494 495 wxString strBuffer; 495 496 int iMax = m_pGridPane->GetNumberRows(); 497 UpdateRefreshTimer(iMax); 496 498 for(int iRow = 0; iRow < iMax; iRow++) { 497 499 498 500 FormatProjectName(iRow, strBuffer); -
../clientgui/ViewWorkGrid.cpp
818 818 if ( m_pGridPane->GetNumberRows() ) { 819 819 m_pGridPane->DeleteRows(0, m_pGridPane->GetNumberRows()); 820 820 } 821 UpdateRefreshTimer(0); 821 822 return; 822 823 } 823 824 … … 844 845 //update cell values 845 846 wxString strBuffer; 846 847 int iMax = m_pGridPane->GetNumberRows(); 848 UpdateRefreshTimer(iMax); 847 849 848 850 if (rowCountChanged) { 849 851 for(int iRow = 0; iRow < iMax; iRow++) { -
../clientgui/AdvancedFrame.cpp
2039 2039 #endif 2040 2040 } 2041 2041 2042 void CAdvancedFrame::UpdateListPanelRenderTimerInterval( const int newInterval) { 2043 if (newInterval != m_pFrameListPanelRenderTimer->GetInterval()) 2044 m_pFrameListPanelRenderTimer->Start(newInterval); 2045 } 2042 2046 2043 2047 void CAdvancedFrame::UpdateActivityModeControls( CC_STATUS& status ) { 2044 2048 wxMenuBar* pMenuBar = GetMenuBar(); -
../clientgui/AdvancedFrame.h
94 94 95 95 void ResetReminderTimers(); 96 96 97 void UpdateListPanelRenderTimerInterval( const int newInterval ); 98 99 private: 97 100 wxTimer* m_pRefreshStateTimer; 98 101 wxTimer* m_pFrameRenderTimer; 99 102 wxTimer* m_pFrameListPanelRenderTimer; 100 103 101 private:102 103 104 wxMenuBar* m_pMenubar; 104 105 wxNotebook* m_pNotebook; 105 106 CStatusBar* m_pStatusbar;