From 56feddacd0b0a274c150d5b64c45ecd926fb812e Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 7 Jul 2006 18:22:31 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=10596 --- checkin_notes | 7 +++++++ clientgui/BOINCTaskBar.cpp | 7 +++---- clientgui/MainDocument.cpp | 6 +++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/checkin_notes b/checkin_notes index bf6e3572c3..fbf4d22478 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7333,3 +7333,10 @@ David 6 July 2006 html/inc/ prefs.inc + +Rom 7 July 2006 + - Only display the suspended icon in the taskbar if the activity runmode + is set to never. + + clientgui/ + BOINCTaskBar.cpp diff --git a/clientgui/BOINCTaskBar.cpp b/clientgui/BOINCTaskBar.cpp index 1e7cda37c2..7532cbbb53 100644 --- a/clientgui/BOINCTaskBar.cpp +++ b/clientgui/BOINCTaskBar.cpp @@ -125,8 +125,7 @@ void CTaskBarIcon::OnRefresh(wxTimerEvent& event) { wxLogTrace(wxT("Function Start/End"), wxT("CTaskBarIcon::OnRefresh - Function Begin")); CMainDocument* pDoc = wxGetApp().GetDocument(); - bool bActivitiesSuspended = false; - bool bNetworkSuspended = false; + wxInt32 iActivityMode = -1; wxASSERT(pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); @@ -145,14 +144,14 @@ void CTaskBarIcon::OnRefresh(wxTimerEvent& event) { // What is the current status of the client? - pDoc->GetActivityState(bActivitiesSuspended, bNetworkSuspended); + pDoc->GetActivityRunMode(iActivityMode); // Which icon should be displayed? if (!pDoc->IsConnected()) { SetIcon(m_iconTaskBarDisconnected, m_strDefaultTitle); } else { - if (bActivitiesSuspended) { + if (RUN_MODE_NEVER == iActivityMode) { SetIcon(m_iconTaskBarSnooze, m_strDefaultTitle); } else { SetIcon(m_iconTaskBarNormal, m_strDefaultTitle); diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 4a1ae3902c..f6efc9e45c 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -482,7 +482,7 @@ int CMainDocument::GetActivityRunMode(int& iMode) { if (IsConnected()) { wxTimeSpan ts(wxDateTime::Now() - m_dtCachedActivityRunModeTimestamp); - if (ts.GetSeconds() > 10) { + if (ts.GetSeconds() > 2) { m_dtCachedActivityRunModeTimestamp = wxDateTime::Now(); iRetVal = rpc.get_run_mode(iMode); @@ -520,7 +520,7 @@ int CMainDocument::GetNetworkRunMode(int& iMode) { if (IsConnected()) { wxTimeSpan ts(wxDateTime::Now() - m_dtCachedNetworkRunModeTimestamp); - if (ts.GetSeconds() > 10) { + if (ts.GetSeconds() > 2) { m_dtCachedNetworkRunModeTimestamp = wxDateTime::Now(); iRetVal = rpc.get_network_mode(iMode); @@ -557,7 +557,7 @@ int CMainDocument::GetActivityState(bool& bActivitiesSuspended, bool& bNetworkSu int iRetVal = 0; wxTimeSpan ts(wxDateTime::Now() - m_dtCachedActivityStateTimestamp); - if (ts.GetSeconds() > 10) { + if (ts.GetSeconds() > 2) { m_dtCachedActivityStateTimestamp = wxDateTime::Now(); if (IsConnected()) {