From b61533df1d4a91b61f682fd8df5956e9dc8663f8 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 7 May 2008 10:15:53 +0000 Subject: [PATCH] MGR: Statistics and Disk tab panes: clear when disconnected from Client, update quickly when connecting to a (different) Client. svn path=/trunk/boinc/; revision=15139 --- checkin_notes | 7 +++++++ clientgui/MainDocument.cpp | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/checkin_notes b/checkin_notes index cd66cf2b23..3cd51d9fe9 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3658,3 +3658,10 @@ David May 6 2008 sched/ sched_send.C + +Charlie May 7 2008 + - MGR: Statistics and Disk tab panes: clear when disconnected from Client, + update quickly when connecting to a (different) Client. + + clientgui/ + MainDocument.cpp diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index ffb4fe7f30..ebd6e37a93 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -488,6 +488,7 @@ int CMainDocument::ResetState() { host.clear_host_info(); results.clear(); ft.clear(); + statistics_status.clear(); disk_usage.clear(); proxy_info.clear(); @@ -1516,8 +1517,9 @@ int CMainDocument::CachedDiskUsageUpdate() { wxTimeSpan ts(wxDateTime::Now() - m_dtDiskUsageTimestamp); // don't get disk usage more than once per minute + // unless we just connected to a client // - if (ts.GetSeconds() > 60) { + if ((ts.GetSeconds() > 60) || disk_usage.projects.empty()) { m_dtDiskUsageTimestamp = wxDateTime::Now(); iRetVal = rpc.get_disk_usage(disk_usage); @@ -1554,7 +1556,7 @@ int CMainDocument::CachedStatisticsStatusUpdate() { if (IsConnected()) { wxTimeSpan ts(wxDateTime::Now() - m_dtStatisticsStatusTimestamp); - if (ts.GetSeconds() > 0) { + if ((ts.GetSeconds() > 0) || statistics_status.projects.empty()) { m_dtStatisticsStatusTimestamp = wxDateTime::Now(); iRetVal = rpc.get_statistics(statistics_status);