*** empty log message ***

svn path=/trunk/boinc/; revision=10581
This commit is contained in:
Rom Walton 2006-07-06 01:33:52 +00:00
parent 440c667e8a
commit 8e948e1782
4 changed files with 18 additions and 24 deletions

View File

@ -7257,3 +7257,10 @@ David 5 July 2006
opt_out.php (new)
prefs.php
prefs_edit_form.php
Rom 5 July 2006
- Bug fixes to previous check-in and code cleanup.
clientgui/
AdvancedFrame.cpp
BOINCTaskBar.cpp, .h

View File

@ -841,12 +841,10 @@ void CAdvancedFrame::OnActivitySelection(wxCommandEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnActivitySelection - Function Begin"));
CMainDocument* pDoc = wxGetApp().GetDocument();
CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon();
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon();
wxASSERT(pTaskbar);
wxASSERT(wxDynamicCast(pTaskbar, CTaskBarIcon));
@ -872,12 +870,10 @@ void CAdvancedFrame::OnNetworkSelection(wxCommandEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::OnNetworkSelection - Function Begin"));
CMainDocument* pDoc = wxGetApp().GetDocument();
CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon();
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
CTaskBarIcon* pTaskbar = wxGetApp().GetTaskBarIcon();
wxASSERT(pTaskbar);
wxASSERT(wxDynamicCast(pTaskbar, CTaskBarIcon));

View File

@ -125,42 +125,34 @@ void CTaskBarIcon::OnRefresh(wxTimerEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CTaskBarIcon::OnRefresh - Function Begin"));
CMainDocument* pDoc = wxGetApp().GetDocument();
bool bResetSnooze = false;
wxInt32 iActivityMode = -1;
wxInt32 iNetworkMode = -1;
bool bActivitiesSuspended = false;
bool bNetworkSuspended = false;
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
// If we are done snoozing, change our settings back to their original settings
if (m_bResetSnooze) {
bResetSnooze = true;
}
if (wxDateTime((time_t)0) != m_dtSnoozeStartTime) {
wxTimeSpan ts(wxDateTime::Now() - m_dtSnoozeStartTime);
if (ts.GetMinutes() >= 60) {
bResetSnooze = true;
}
}
if (bResetSnooze) {
pDoc->SetActivityRunMode(m_iPreviousActivityMode);
pDoc->SetNetworkRunMode(m_iPreviousNetworkMode);
pDoc->SetActivityRunMode(m_iPreviousActivityMode);
pDoc->SetNetworkRunMode(m_iPreviousNetworkMode);
m_dtSnoozeStartTime = wxDateTime((time_t)0);
ResetSnoozeState();
}
}
// What is the current status of the client?
pDoc->GetActivityRunMode(iActivityMode);
pDoc->GetNetworkRunMode(iNetworkMode);
pDoc->GetActivityState(bActivitiesSuspended, bNetworkSuspended);
// Which icon should be displayed?
if (!pDoc->IsConnected()) {
SetIcon(m_iconTaskBarDisconnected, m_strDefaultTitle);
} else {
if (RUN_MODE_NEVER == iActivityMode) {
if (bActivitiesSuspended) {
SetIcon(m_iconTaskBarSnooze, m_strDefaultTitle);
} else {
SetIcon(m_iconTaskBarNormal, m_strDefaultTitle);
@ -479,7 +471,7 @@ void CTaskBarIcon::OnRButtonUp(wxTaskBarIconEvent& WXUNUSED(event)) {
void CTaskBarIcon::ResetSnoozeState() {
m_bResetSnooze = true;
m_dtSnoozeStartTime = wxDateTime((time_t)0);
}

View File

@ -95,7 +95,6 @@ private:
wxTimer* m_pRefreshTimer;
bool m_bMouseButtonPressed;
bool m_bResetSnooze;
int m_iPreviousActivityMode;
int m_iPreviousNetworkMode;