MGR: Fix updates of Statistics tab when pressng buttons or connecting to a different host under async GUI RPCs

svn path=/trunk/boinc/; revision=15968
This commit is contained in:
Charlie Fenton 2008-09-05 04:12:01 +00:00
parent 229650ec15
commit 0d64e99e6d
4 changed files with 21 additions and 3 deletions

View File

@ -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

View File

@ -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);
}
}

View File

@ -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;

View File

@ -146,6 +146,7 @@ public:
int SetNetworkRunMode(int iMode, int iTimeout);
void RefreshRPCs();
void RefreshSlowRPCs();
void RunPeriodicRPCs();
int ForceCacheUpdate(bool immediate = true);
int RunBenchmarks();