From 208a6ec1207b05b1e7e5c55b0d27b64b3e5e92e2 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 9 Dec 2008 15:25:47 +0000 Subject: [PATCH] - MGR: fix the terms of use wizard page. clientgui/ TermsOfUsePage.cpp svn path=/trunk/boinc/; revision=16657 --- checkin_notes | 6 ++++++ clientgui/TermsOfUsePage.cpp | 23 +++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/checkin_notes b/checkin_notes index 4b236bb9a2..889c4fcd56 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9985,3 +9985,9 @@ Charlie 9 Dec 2008 sg_ViewTabPage.cpp common/ wxFlatNotebook.cpp + +Rom 9 Dec 2008 + - MGR: fix the terms of use wizard page. + + clientgui/ + TermsOfUsePage.cpp diff --git a/clientgui/TermsOfUsePage.cpp b/clientgui/TermsOfUsePage.cpp index ec297c6443..884f7137d8 100644 --- a/clientgui/TermsOfUsePage.cpp +++ b/clientgui/TermsOfUsePage.cpp @@ -82,6 +82,7 @@ bool CTermsOfUsePage::Create( CBOINCBaseWizard* parent ) m_pTermsOfUseCtrl = NULL; m_pAgreeCtrl = NULL; m_pDisagreeCtrl = NULL; + m_bUserAgrees = false; ////@end CTermsOfUsePage member initialisation ////@begin CTermsOfUsePage creation @@ -219,15 +220,19 @@ void CTermsOfUsePage::OnPageChanged( wxWizardExEvent& event ) { m_pTermsOfUseCtrl->SetValue( wxString(pc.terms_of_use.c_str(), wxConvUTF8) ); - m_pTermsOfUseCtrl->SetSelection(0, 0); + m_pTermsOfUseCtrl->SetSelection(0,0); m_pAgreeCtrl->SetLabel( _("I agree to the terms of use.") ); + m_pAgreeCtrl->SetValue(false); + m_pDisagreeCtrl->SetLabel( - _("I do not agree to the terms of use.") + _("I do not agree with the terms of use.") ); + m_pDisagreeCtrl->SetValue(true); + SetUserAgrees(false); Fit(); } @@ -244,15 +249,21 @@ void CTermsOfUsePage::OnCancel( wxWizardExEvent& event ) { * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL */ -void CTermsOfUsePage::OnAgree( wxCommandEvent& /* event */ ) { - SetUserAgrees(true); +void CTermsOfUsePage::OnAgree( wxCommandEvent& event ) { + if (event.IsChecked()){ + wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnAgree - SetUserAgrees(true)")); + SetUserAgrees(true); + } } /*! * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEDISAGREECTRL */ -void CTermsOfUsePage::OnDisagree( wxCommandEvent& /* event */ ) { - SetUserAgrees(false); +void CTermsOfUsePage::OnDisagree( wxCommandEvent& event ) { + if (event.IsChecked()) { + wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnDisagree - SetUserAgrees(false)")); + SetUserAgrees(false); + } }