diff --git a/checkin_notes b/checkin_notes index 322ca7e9c7..4e3fe4686e 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7227,3 +7227,11 @@ Charlie 4 Sep 2008 mac_build/ boinc.xcodeproj/ project.pbxproj + +Charlie 4 Sep 2008 + MGR: Fix updates of Statistics tab when pressng buttons or connecting + to a different host under async GUI RPCs. + + clientgui/ + BOINCBaseFrame.cpp + MainDocument.cpp,.h diff --git a/clientgui/BOINCBaseFrame.cpp b/clientgui/BOINCBaseFrame.cpp index 4e99b9c02f..0c10cdc64b 100644 --- a/clientgui/BOINCBaseFrame.cpp +++ b/clientgui/BOINCBaseFrame.cpp @@ -385,8 +385,11 @@ void CBOINCBaseFrame::FireRefreshView() { pDoc->RunPeriodicRPCs(); -// CFrameEvent event(wxEVT_FRAME_REFRESHVIEW, this); -// AddPendingEvent(event); + int currentTabView = wxGetApp().GetCurrentViewPage(); + if (currentTabView & VW_STAT) { + CFrameEvent event(wxEVT_FRAME_REFRESHVIEW, this); + AddPendingEvent(event); + } } diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 77c39c9641..e4dc5c681b 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -284,6 +284,7 @@ void CNetworkConnection::SetStateReconnecting() { m_strNewComputerName = m_strConnectedComputerName; m_strNewComputerPassword = m_strConnectedComputerPassword; } + m_pDocument->RefreshSlowRPCs(); pFrame->FireRefreshView(); } } @@ -718,9 +719,14 @@ void CMainDocument::RefreshRPCs() { } +void CMainDocument::RefreshSlowRPCs() { + m_dtDiskUsageTimestamp = wxDateTime((time_t)0); + m_dtStatisticsStatusTimestamp = wxDateTime((time_t)0); +} + + void CMainDocument::RunPeriodicRPCs() { ASYNC_RPC_REQUEST request; -// int retval = 0; if (!IsConnected()) return; diff --git a/clientgui/MainDocument.h b/clientgui/MainDocument.h index 2f7fac5ba8..843430b811 100644 --- a/clientgui/MainDocument.h +++ b/clientgui/MainDocument.h @@ -146,6 +146,7 @@ public: int SetNetworkRunMode(int iMode, int iTimeout); void RefreshRPCs(); + void RefreshSlowRPCs(); void RunPeriodicRPCs(); int ForceCacheUpdate(bool immediate = true); int RunBenchmarks();