diff --git a/checkin_notes b/checkin_notes index a524a2ded0..06219b5e8d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -2025,3 +2025,12 @@ Rom 17 Feb 2006 WizardAccountManager.cpp WizardAttachProject.cpp +Rom 17 Feb 2006 + - Bug Fix: Reset the reminder timers when the user updates something. + + clientgui/ + BOINCDialupManager.cpp, .h + MainFrame.cpp, .h + ViewProjects.cpp + ViewTransfers.cpp + diff --git a/clientgui/BOINCDialupManager.cpp b/clientgui/BOINCDialupManager.cpp index b2df103ee9..ed6f3b2160 100644 --- a/clientgui/BOINCDialupManager.cpp +++ b/clientgui/BOINCDialupManager.cpp @@ -35,9 +35,7 @@ CBOINCDialUpManager::CBOINCDialUpManager() { m_pDialupManager = wxDialUpManager::Create(); wxASSERT(m_pDialupManager->IsOk()); - m_dtLastDialupAlertSent = wxDateTime((time_t)0); - m_dtLastDialupRequest = wxDateTime((time_t)0); - m_dtDialupConnectionTimeout = wxDateTime((time_t)0); + ResetReminderTimers(); m_bSetConnectionTimer = false; m_bNotifyConnectionAvailable = false; m_bConnectedSuccessfully = false; @@ -112,9 +110,7 @@ void CBOINCDialUpManager::poll() { m_bResetTimers = false; m_bSetConnectionTimer = false; - m_dtLastDialupAlertSent = wxDateTime((time_t)0); - m_dtLastDialupRequest = wxDateTime((time_t)0); - m_dtDialupConnectionTimeout = wxDateTime((time_t)0); + ResetReminderTimers(); } // Log out the trace information for debugging purposes. @@ -464,3 +460,10 @@ int CBOINCDialUpManager::Disconnect() { return 0; } + +void CMainFrame::ResetReminderTimers() { + m_dtLastDialupAlertSent = wxDateTime((time_t)0); + m_dtLastDialupRequest = wxDateTime((time_t)0); + m_dtDialupConnectionTimeout = wxDateTime((time_t)0); +} + diff --git a/clientgui/BOINCDialupManager.h b/clientgui/BOINCDialupManager.h index 6bafbe5576..6975e7029a 100644 --- a/clientgui/BOINCDialupManager.h +++ b/clientgui/BOINCDialupManager.h @@ -47,6 +47,7 @@ public: int Disconnect(); + void ResetReminderTimers(); protected: wxDialUpManager* m_pDialupManager; diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index ff0fb3e0f2..7691114b9e 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -1171,6 +1171,7 @@ void CMainFrame::OnAccountManagerUpdate(wxCommandEvent& WXUNUSED(event)) { DeleteMenu(); CreateMenu(); FireRefreshView(); + ResetReminderTimers(); m_pRefreshStateTimer->Start(); m_pFrameRenderTimer->Start(); @@ -1875,6 +1876,37 @@ void CMainFrame::OnNotebookSelectionChanged(wxNotebookEvent& event) { } +void CMainFrame::ExecuteBrowserLink(const wxString &strLink) { + wxHyperLink::ExecuteLink(strLink); +} + + +void CMainFrame::FireInitialize() { + CMainFrameEvent event(wxEVT_MAINFRAME_INITIALIZED, this); + AddPendingEvent(event); +} + + +void CMainFrame::FireRefreshView() { + CMainFrameEvent event(wxEVT_MAINFRAME_REFRESHVIEW, this); + AddPendingEvent(event); +} + + +void CMainFrame::FireConnect() { + CMainFrameEvent event(wxEVT_MAINFRAME_CONNECT, this); + AddPendingEvent(event); +} + + +void CMainFrame::ResetReminderTimers() { + wxASSERT(m_pDialupManager); + wxASSERT(wxDynamicCast(m_pDialupManager, CBOINCDialUpManager)); + + m_pDialupManager->ResetReminderTimers(); +} + + void CMainFrame::SetFrameListPanelRenderTimerRate() { static wxWindowID previousPane = -1; static int connectedCount = 0; @@ -1920,31 +1952,6 @@ void CMainFrame::SetFrameListPanelRenderTimerRate() { } -void CMainFrame::UpdateStatusText(const wxChar* szStatus) { - wxString strStatus = szStatus; - m_pStatusbar->SetStatusText(strStatus); - ::wxSleep(0); -} - - -void CMainFrame::FireInitialize() { - CMainFrameEvent event(wxEVT_MAINFRAME_INITIALIZED, this); - AddPendingEvent(event); -} - - -void CMainFrame::FireRefreshView() { - CMainFrameEvent event(wxEVT_MAINFRAME_REFRESHVIEW, this); - AddPendingEvent(event); -} - - -void CMainFrame::FireConnect() { - CMainFrameEvent event(wxEVT_MAINFRAME_CONNECT, this); - AddPendingEvent(event); -} - - void CMainFrame::ShowConnectionBadPasswordAlert() { wxString strDialogTitle = wxEmptyString; @@ -2046,8 +2053,10 @@ void CMainFrame::ShowAlert( const wxString title, const wxString message, const } -void CMainFrame::ExecuteBrowserLink(const wxString &strLink) { - wxHyperLink::ExecuteLink(strLink); +void CMainFrame::UpdateStatusText(const wxChar* szStatus) { + wxString strStatus = szStatus; + m_pStatusbar->SetStatusText(strStatus); + ::wxSleep(0); } diff --git a/clientgui/MainFrame.h b/clientgui/MainFrame.h index cad7574156..55ad265904 100644 --- a/clientgui/MainFrame.h +++ b/clientgui/MainFrame.h @@ -100,8 +100,7 @@ public: void OnRefreshView( CMainFrameEvent& event ); void OnConnect( CMainFrameEvent& event ); - void SetFrameListPanelRenderTimerRate(); - void UpdateStatusText( const wxChar* szStatus ); + void ExecuteBrowserLink( const wxString& strLink ); void FireInitialize(); void FireRefreshView(); @@ -111,6 +110,12 @@ public: wxString GetDialupConnectionName() { return m_strNetworkDialupConnectionName; } bool GetDialupPromptForCredentials() { return m_bNetworkDialupPromptCredentials; } + void ResetReminderTimers(); + + void SetFrameListPanelRenderTimerRate(); // TODO: refactor out of the frame and put the + // relevent code in OnPageChanged function + // and the base/statistics view. + void ShowConnectionBadPasswordAlert(); void ShowConnectionFailedAlert(); void ShowNotCurrentlyConnectedAlert(); @@ -122,7 +127,7 @@ public: const MainFrameAlertEventType alert_event_type = AlertNormal ); - void ExecuteBrowserLink( const wxString& strLink ); + void UpdateStatusText( const wxChar* szStatus ); #ifdef __WXMAC__ bool Show( bool show = true ); diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp index 1a4a5b65ef..df06309933 100644 --- a/clientgui/ViewProjects.cpp +++ b/clientgui/ViewProjects.cpp @@ -195,6 +195,7 @@ void CViewProjects::OnProjectUpdate( wxCommandEvent& WXUNUSED(event) ) { m_bForceUpdateSelection = true; UpdateSelection(); + pFrame->ResetReminderTimers(); pFrame->FireRefreshView(); wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectUpdate - Function End")); diff --git a/clientgui/ViewTransfers.cpp b/clientgui/ViewTransfers.cpp index 69978791c8..cd2dc47c8f 100644 --- a/clientgui/ViewTransfers.cpp +++ b/clientgui/ViewTransfers.cpp @@ -159,6 +159,7 @@ void CViewTransfers::OnTransfersRetryNow( wxCommandEvent& WXUNUSED(event) ) { pFrame->UpdateStatusText(wxT("")); UpdateSelection(); + pFrame->ResetReminderTimers(); pFrame->FireRefreshView(); wxLogTrace(wxT("Function Start/End"), wxT("CViewTransfers::OnTransfersRetryNow - Function End"));