From 6b2f236aa0768beff7722b2966032a50fe6b7e5e Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 26 Oct 2004 08:41:02 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4428 --- clientgui/BOINCBaseView.cpp | 18 +++++++++++++----- clientgui/BOINCBaseView.h | 2 ++ clientgui/ViewMessages.cpp | 17 ++++++++++++----- clientgui/ViewMessages.h | 1 + clientgui/ViewProjects.cpp | 11 +++++++++++ clientgui/ViewProjects.h | 1 + clientgui/ViewResources.cpp | 11 +++++++++++ clientgui/ViewResources.h | 1 + clientgui/ViewTransfers.cpp | 11 +++++++++++ clientgui/ViewTransfers.h | 1 + clientgui/ViewWork.cpp | 11 +++++++++++ clientgui/ViewWork.h | 1 + 12 files changed, 76 insertions(+), 10 deletions(-) diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index ddfa07a931..d8f6f6e144 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -111,6 +111,18 @@ char** CBOINCBaseView::GetViewIcon() } +wxInt32 CBOINCBaseView::_GetListRowCount() +{ + return GetListRowCount(); +} + + +wxInt32 CBOINCBaseView::GetListRowCount() +{ + return 0; +} + + void CBOINCBaseView::_OnTaskRender (wxTimerEvent& event) { OnTaskRender( event ); @@ -151,13 +163,9 @@ void CBOINCBaseView::OnListRender (wxTimerEvent& event) { m_bProcessingListRenderEvent = true; - CMainDocument* pDoc = wxGetApp().GetDocument(); - - wxASSERT(NULL != pDoc); - wxASSERT(wxDynamicCast(pDoc, CMainDocument)); wxASSERT(NULL != m_pListPane); - wxInt32 iCount = pDoc->GetProjectCount(); + wxInt32 iCount = _GetListRowCount(); if ( iCount != m_iCount ) { m_iCount = iCount; diff --git a/clientgui/BOINCBaseView.h b/clientgui/BOINCBaseView.h index 9cb7795ad2..06f410a857 100644 --- a/clientgui/BOINCBaseView.h +++ b/clientgui/BOINCBaseView.h @@ -47,6 +47,8 @@ public: virtual wxString GetViewName(); virtual char** GetViewIcon(); + wxInt32 _GetListRowCount(); + virtual wxInt32 GetListRowCount(); void _OnTaskRender( wxTimerEvent& event ); void _OnListRender( wxTimerEvent& event ); diff --git a/clientgui/ViewMessages.cpp b/clientgui/ViewMessages.cpp index d618c5d3ff..e917f5bb80 100644 --- a/clientgui/ViewMessages.cpp +++ b/clientgui/ViewMessages.cpp @@ -142,19 +142,26 @@ char** CViewMessages::GetViewIcon() } +wxInt32 CViewMessages::GetListRowCount() +{ + CMainDocument* pDoc = wxGetApp().GetDocument(); + + wxASSERT(NULL != pDoc); + wxASSERT(wxDynamicCast(pDoc, CMainDocument)); + + return pDoc->GetMessageCount(); +} + + void CViewMessages::OnListRender(wxTimerEvent &event) { if (!m_bProcessingListRenderEvent) { m_bProcessingListRenderEvent = true; - CMainDocument* pDoc = wxGetApp().GetDocument(); - - wxASSERT(NULL != pDoc); - wxASSERT(wxDynamicCast(pDoc, CMainDocument)); wxASSERT(NULL != m_pListPane); - wxInt32 iCount = pDoc->GetMessageCount(); + wxInt32 iCount = _GetListRowCount(); if ( iCount != m_iCount ) { m_iCount = iCount; diff --git a/clientgui/ViewMessages.h b/clientgui/ViewMessages.h index dfe04b370a..315870c06b 100644 --- a/clientgui/ViewMessages.h +++ b/clientgui/ViewMessages.h @@ -43,6 +43,7 @@ public: virtual wxString GetViewName(); virtual char** GetViewIcon(); + virtual wxInt32 GetListRowCount(); virtual void OnListRender( wxTimerEvent& event ); diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp index 199a4b5303..7b6f154fbd 100644 --- a/clientgui/ViewProjects.cpp +++ b/clientgui/ViewProjects.cpp @@ -186,6 +186,17 @@ char** CViewProjects::GetViewIcon() } +wxInt32 CViewProjects::GetListRowCount() +{ + CMainDocument* pDoc = wxGetApp().GetDocument(); + + wxASSERT(NULL != pDoc); + wxASSERT(wxDynamicCast(pDoc, CMainDocument)); + + return pDoc->GetProjectCount(); +} + + wxString CViewProjects::OnListGetItemText(long item, long column) const { wxString strBuffer = wxEmptyString; diff --git a/clientgui/ViewProjects.h b/clientgui/ViewProjects.h index aad4342725..1c5be23168 100644 --- a/clientgui/ViewProjects.h +++ b/clientgui/ViewProjects.h @@ -43,6 +43,7 @@ public: virtual wxString GetViewName(); virtual char** GetViewIcon(); + virtual wxInt32 GetListRowCount(); virtual wxString OnListGetItemText( long item, long column ) const; diff --git a/clientgui/ViewResources.cpp b/clientgui/ViewResources.cpp index 3875d33508..ad7697aee2 100644 --- a/clientgui/ViewResources.cpp +++ b/clientgui/ViewResources.cpp @@ -113,6 +113,17 @@ char** CViewResources::GetViewIcon() } +wxInt32 CViewResources::GetListRowCount() +{ + CMainDocument* pDoc = wxGetApp().GetDocument(); + + wxASSERT(NULL != pDoc); + wxASSERT(wxDynamicCast(pDoc, CMainDocument)); + + return pDoc->GetResourceCount(); +} + + wxString CViewResources::OnListGetItemText( long item, long column ) const { wxString strBuffer = wxEmptyString; diff --git a/clientgui/ViewResources.h b/clientgui/ViewResources.h index ea46d70a6e..de3e64dccf 100644 --- a/clientgui/ViewResources.h +++ b/clientgui/ViewResources.h @@ -43,6 +43,7 @@ public: virtual wxString GetViewName(); virtual char** GetViewIcon(); + virtual wxInt32 GetListRowCount(); virtual wxString OnListGetItemText( long item, long column ) const; diff --git a/clientgui/ViewTransfers.cpp b/clientgui/ViewTransfers.cpp index 7e2ed28770..02b510bb00 100644 --- a/clientgui/ViewTransfers.cpp +++ b/clientgui/ViewTransfers.cpp @@ -135,6 +135,17 @@ char** CViewTransfers::GetViewIcon() } +wxInt32 CViewTransfers::GetListRowCount() +{ + CMainDocument* pDoc = wxGetApp().GetDocument(); + + wxASSERT(NULL != pDoc); + wxASSERT(wxDynamicCast(pDoc, CMainDocument)); + + return pDoc->GetTransferCount(); +} + + wxString CViewTransfers::OnListGetItemText(long item, long column) const { wxString strBuffer = wxEmptyString; diff --git a/clientgui/ViewTransfers.h b/clientgui/ViewTransfers.h index 9945cb0141..773a402834 100644 --- a/clientgui/ViewTransfers.h +++ b/clientgui/ViewTransfers.h @@ -43,6 +43,7 @@ public: virtual wxString GetViewName(); virtual char** GetViewIcon(); + virtual wxInt32 GetListRowCount(); virtual wxString OnListGetItemText( long item, long column ) const; diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index 8b5115039e..8055b05224 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -147,6 +147,17 @@ char** CViewWork::GetViewIcon() } +wxInt32 CViewWork::GetListRowCount() +{ + CMainDocument* pDoc = wxGetApp().GetDocument(); + + wxASSERT(NULL != pDoc); + wxASSERT(wxDynamicCast(pDoc, CMainDocument)); + + return pDoc->GetWorkCount(); +} + + wxString CViewWork::OnListGetItemText( long item, long column ) const { wxString strBuffer = wxEmptyString; diff --git a/clientgui/ViewWork.h b/clientgui/ViewWork.h index 5ffdd81356..b0fbfbb7c9 100644 --- a/clientgui/ViewWork.h +++ b/clientgui/ViewWork.h @@ -43,6 +43,7 @@ public: virtual wxString GetViewName(); virtual char** GetViewIcon(); + virtual wxInt32 GetListRowCount(); virtual wxString OnListGetItemText( long item, long column ) const;