diff --git a/checkin_notes b/checkin_notes index fdef2a846c..e8df581f5f 100644 --- a/checkin_notes +++ b/checkin_notes @@ -9617,3 +9617,21 @@ David 25 Nov 2008 client/ cs_platforms.cpp + +Rom 25 Nov 2008 + - MGR: Remove the Account Key page from the Wizard. + - MGR: Add a Terms of Use page to the Wizard. + + clientgui/ + AccountInfoPage.cpp + AccountKeyPage.cpp, .h (removed) + AccountManagerPropertiesPage.cpp, .h + BOINCWizards.h + ProjectProcessingPage.cpp + ProjectPropertiesPage.cpp, .h + ProxyPage.cpp + TermsOfUsePage .cpp, .h (added) + WizardAccountManager.cpp, .h + WizardAttachProject.cpp, .h + win_build/ + boincmgr_curl.vcproj diff --git a/clientgui/AccountInfoPage.cpp b/clientgui/AccountInfoPage.cpp index b9a892259d..f20267215b 100644 --- a/clientgui/AccountInfoPage.cpp +++ b/clientgui/AccountInfoPage.cpp @@ -60,7 +60,6 @@ BEGIN_EVENT_TABLE( CAccountInfoPage, wxWizardPageEx ) EVT_WIZARDEX_PAGE_CHANGED( -1, CAccountInfoPage::OnPageChanged ) EVT_WIZARDEX_PAGE_CHANGING( -1, CAccountInfoPage::OnPageChanging ) EVT_WIZARDEX_CANCEL( -1, CAccountInfoPage::OnCancel ) - EVT_RADIOBUTTON( ID_ACCOUNTCREATECTRL, CAccountInfoPage::OnAccountCreateCtrlSelected ) EVT_RADIOBUTTON( ID_ACCOUNTUSEEXISTINGCTRL, CAccountInfoPage::OnAccountUseExistingCtrlSelected ) ////@end CAccountInfoPage event table entries @@ -417,9 +416,9 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& event ) { m_pAccountEmailAddressCtrl->SetValidator( CValidateEmailAddress(& m_strAccountEmailAddress) ); } - if (((CBOINCBaseWizard*)GetParent())->project_config.min_passwd_length) { + if (pc.min_passwd_length) { wxString str; - str.Printf(_("minimum length %d"), ((CBOINCBaseWizard*)GetParent())->project_config.min_passwd_length); + str.Printf(_("minimum length %d"), pc.min_passwd_length); m_pAccountPasswordRequirmentsStaticCtrl->SetLabel( str ); } diff --git a/clientgui/AccountKeyPage.cpp b/clientgui/AccountKeyPage.cpp deleted file mode 100644 index 4cea3f65e5..0000000000 --- a/clientgui/AccountKeyPage.cpp +++ /dev/null @@ -1,249 +0,0 @@ -// This file is part of BOINC. -// http://boinc.berkeley.edu -// Copyright (C) 2008 University of California -// -// BOINC is free software; you can redistribute it and/or modify it -// under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// BOINC is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// See the GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with BOINC. If not, see . -// -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "AccountKeyPage.h" -#endif - -#include "stdwx.h" -#include "diagnostics.h" -#include "util.h" -#include "mfile.h" -#include "miofile.h" -#include "parse.h" -#include "error_numbers.h" -#include "wizardex.h" -#include "error_numbers.h" -#include "BOINCGUIApp.h" -#include "SkinManager.h" -#include "MainDocument.h" -#include "ValidateAccountKey.h" -#include "BOINCWizards.h" -#include "BOINCBaseWizard.h" -#include "AccountKeyPage.h" - - -/*! - * CAccountKeyPage type definition - */ - -IMPLEMENT_DYNAMIC_CLASS( CAccountKeyPage, wxWizardPageEx ) - -/*! - * CAccountKeyPage event table definition - */ - -BEGIN_EVENT_TABLE( CAccountKeyPage, wxWizardPageEx ) - -////@begin CAccountKeyPage event table entries - EVT_WIZARDEX_PAGE_CHANGED( -1, CAccountKeyPage::OnPageChanged ) - EVT_WIZARDEX_CANCEL( -1, CAccountKeyPage::OnCancel ) - -////@end CAccountKeyPage event table entries - -END_EVENT_TABLE() - -/*! - * CAccountKeyPage constructors - */ - -CAccountKeyPage::CAccountKeyPage( ) -{ -} - -CAccountKeyPage::CAccountKeyPage( CBOINCBaseWizard* parent ) -{ - Create( parent ); -} - -/*! - * CAuthenticatorPage creator - */ - -bool CAccountKeyPage::Create( CBOINCBaseWizard* parent ) -{ -////@begin CAccountKeyPage member initialisation - m_pTitleStaticCtrl = NULL; - m_pDirectionsStaticCtrl = NULL; - m_pAccountKeyExampleDescriptionStaticCtrl = NULL; - m_pAccountKeyExampleStaticCtrl = NULL; - m_pAccountKeyStaticCtrl = NULL; - m_pAccountKeyCtrl = NULL; -////@end CAccountKeyPage member initialisation - -////@begin CAccountKeyPage creation - wxBitmap wizardBitmap(wxNullBitmap); - wxWizardPageEx::Create( parent, ID_ACCOUNTKEYPAGE, wizardBitmap ); - - CreateControls(); - GetSizer()->Fit(this); -////@end CAccountKeyPage creation - - return TRUE; -} - -/*! - * Control creation for CAuthenticatorPage - */ - -void CAccountKeyPage::CreateControls() -{ - -////@begin CAccountKeyPage content construction - CAccountKeyPage* itemWizardPage44 = this; - - wxBoxSizer* itemBoxSizer45 = new wxBoxSizer(wxVERTICAL); - itemWizardPage44->SetSizer(itemBoxSizer45); - - m_pTitleStaticCtrl = new wxStaticText; - m_pTitleStaticCtrl->Create( itemWizardPage44, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana"))); - itemBoxSizer45->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5); - - itemBoxSizer45->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5); - - m_pDirectionsStaticCtrl = new wxStaticText; - m_pDirectionsStaticCtrl->Create( itemWizardPage44, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer45->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5); - - m_pAccountKeyExampleDescriptionStaticCtrl = new wxStaticText; - m_pAccountKeyExampleDescriptionStaticCtrl->Create( itemWizardPage44, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer45->Add(m_pAccountKeyExampleDescriptionStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5); - - m_pAccountKeyExampleStaticCtrl = new wxStaticText; - m_pAccountKeyExampleStaticCtrl->Create( itemWizardPage44, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_pAccountKeyExampleStaticCtrl->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, FALSE, _T("Courier New"))); - itemBoxSizer45->Add(m_pAccountKeyExampleStaticCtrl, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); - - itemBoxSizer45->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - - wxFlexGridSizer* itemFlexGridSizer53 = new wxFlexGridSizer(1, 2, 0, 0); - itemFlexGridSizer53->AddGrowableCol(1); - itemBoxSizer45->Add(itemFlexGridSizer53, 0, wxGROW|wxALL, 5); - - m_pAccountKeyStaticCtrl = new wxStaticText; - m_pAccountKeyStaticCtrl->Create( itemWizardPage44, ID_ACCOUNTKEYSTATICCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer53->Add(m_pAccountKeyStaticCtrl, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxALL, 5); - - m_pAccountKeyCtrl = new wxTextCtrl; - m_pAccountKeyCtrl->Create( itemWizardPage44, ID_ACCOUNTKEYCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - itemFlexGridSizer53->Add(m_pAccountKeyCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5); - - // Set validators - m_pAccountKeyCtrl->SetValidator( CValidateAccountKey( & m_strAccountKey) ); -////@end CAccountKeyPage content construction -} - -/*! - * Gets the previous page. - */ - -wxWizardPageEx* CAccountKeyPage::GetPrev() const -{ - return PAGE_TRANSITION_BACK; -} - -/*! - * Gets the next page. - */ - -wxWizardPageEx* CAccountKeyPage::GetNext() const -{ - if (CHECK_CLOSINGINPROGRESS()) { - // Cancel Event Detected - return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE); - } else { - return PAGE_TRANSITION_NEXT(ID_PROJECTPROCESSINGPAGE); - } - return NULL; -} - -/*! - * Should we show tooltips? - */ - -bool CAccountKeyPage::ShowToolTips() -{ - return TRUE; -} - -/*! - * Get bitmap resources - */ - -wxBitmap CAccountKeyPage::GetBitmapResource( const wxString& WXUNUSED(name) ) -{ - // Bitmap retrieval -////@begin CAccountKeyPage bitmap retrieval - return wxNullBitmap; -////@end CAccountKeyPage bitmap retrieval -} - -/*! - * Get icon resources - */ - -wxIcon CAccountKeyPage::GetIconResource( const wxString& WXUNUSED(name) ) -{ - // Icon retrieval -////@begin CAccountKeyPage icon retrieval - return wxNullIcon; -////@end CAccountKeyPage icon retrieval -} - -/*! - * wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ACCOUNTKEYPAGE - */ - -void CAccountKeyPage::OnPageChanged( wxWizardExEvent& event ) { - if (event.GetDirection() == false) return; - - wxASSERT(m_pTitleStaticCtrl); - wxASSERT(m_pDirectionsStaticCtrl); - wxASSERT(m_pAccountKeyExampleDescriptionStaticCtrl); - wxASSERT(m_pAccountKeyExampleStaticCtrl); - wxASSERT(m_pAccountKeyStaticCtrl); - wxASSERT(m_pAccountKeyCtrl); - - m_pTitleStaticCtrl->SetLabel( - _("Enter account key") - ); - m_pDirectionsStaticCtrl->SetLabel( - _("This project uses an \"account key\" to identify you.\n\nGo to the project's web site to create an account. Your account\nkey will be emailed to you.") - ); - m_pAccountKeyExampleDescriptionStaticCtrl->SetLabel( - _("An account key looks like:") - ); - m_pAccountKeyExampleStaticCtrl->SetLabel( - _("82412313ac88e9a3638f66ea82186948") - ); - m_pAccountKeyStaticCtrl->SetLabel( - _("Account key:") - ); - - Fit(); - m_pAccountKeyCtrl->SetFocus(); -} - -/*! - * wxEVT_WIZARD_CANCEL event handler for ID_ACCOUNTKEYPAGE - */ - -void CAccountKeyPage::OnCancel( wxWizardExEvent& event ) { - PROCESS_CANCELEVENT(event); -} - diff --git a/clientgui/AccountManagerPropertiesPage.cpp b/clientgui/AccountManagerPropertiesPage.cpp index 31188262b7..90faebcb5e 100644 --- a/clientgui/AccountManagerPropertiesPage.cpp +++ b/clientgui/AccountManagerPropertiesPage.cpp @@ -38,6 +38,7 @@ #include "AccountManagerPropertiesPage.h" #include "AccountManagerInfoPage.h" #include "CompletionErrorPage.h" +#include "TermsOfUsePage.h" ////@begin XPM images @@ -114,6 +115,7 @@ bool CAccountManagerPropertiesPage::Create( CBOINCBaseWizard* parent ) m_bProjectClientAccountCreationDisabled = false; m_bNetworkConnectionDetected = false; m_bServerReportedError = false; + m_bTermsOfUseRequired = true; m_iBitmapIndex = 0; m_iCurrentState = ACCTMGRPROP_INIT; @@ -307,6 +309,13 @@ void CAccountManagerPropertiesPage::OnStateChange( CAccountManagerPropertiesPage SetProjectClientAccountCreationDisabled(false); } + bSuccessfulCondition = !pc->terms_of_use.empty(); + if (bSuccessfulCondition || CHECK_DEBUG_FLAG(WIZDEBUG_ERRTERMSOFUSEREQUIRED)) { + SetTermsOfUseRequired(true); + } else { + SetTermsOfUseRequired(false); + } + pWAM->m_strProjectName = wxString(pc->name.c_str(), wxConvUTF8); SetNextState(ACCTMGRPROP_CLEANUP); @@ -419,6 +428,9 @@ wxWizardPageEx* CAccountManagerPropertiesPage::GetNext() const if (CHECK_CLOSINGINPROGRESS()) { // Cancel Event Detected return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE); + } else if (GetProjectPropertiesSucceeded() && GetTermsOfUseRequired()) { + // Terms of Use are required before requesting account information + return PAGE_TRANSITION_NEXT(ID_TERMSOFUSEPAGE); } else if (GetProjectPropertiesSucceeded()) { // We were successful in retrieving the project properties return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE); diff --git a/clientgui/AccountManagerPropertiesPage.h b/clientgui/AccountManagerPropertiesPage.h index 3655a11c90..fe79f1b883 100644 --- a/clientgui/AccountManagerPropertiesPage.h +++ b/clientgui/AccountManagerPropertiesPage.h @@ -124,6 +124,9 @@ public: bool GetServerReportedError() const { return m_bServerReportedError ; } void SetServerReportedError(bool value) { m_bServerReportedError = value ; } + bool GetTermsOfUseRequired() const { return m_bTermsOfUseRequired ; } + void SetTermsOfUseRequired(bool value) { m_bTermsOfUseRequired = value ; } + wxInt32 GetCurrentState() const { return m_iCurrentState ; } void SetNextState(wxInt32 value) { m_iCurrentState = value ; } @@ -146,6 +149,7 @@ public: bool m_bProjectClientAccountCreationDisabled; bool m_bNetworkConnectionDetected; bool m_bServerReportedError; + bool m_bTermsOfUseRequired; int m_iBitmapIndex; int m_iCurrentState; }; diff --git a/clientgui/BOINCWizards.h b/clientgui/BOINCWizards.h index d778d7606d..d25c691be2 100644 --- a/clientgui/BOINCWizards.h +++ b/clientgui/BOINCWizards.h @@ -30,7 +30,7 @@ // Generic Pages #define ID_WELCOMEPAGE 10100 -#define ID_ACCOUNTKEYPAGE 10101 +#define ID_TERMSOFUSEPAGE 10113 #define ID_ACCOUNTINFOPAGE 10102 #define ID_COMPLETIONPAGE 10103 #define ID_COMPLETIONERRORPAGE 10104 @@ -87,9 +87,10 @@ #define ID_PROJECTURLDESCRIPTIONSTATICCTRL 11202 #define ID_PROJECTURLCTRL 11203 -// Account Key Controls -#define ID_ACCOUNTKEYSTATICCTRL 11300 -#define ID_ACCOUNTKEYCTRL 11301 +// Terms Of Use Controls +#define ID_TERMSOFUSECTRL 11300 +#define ID_TERMSOFUSEAGREECTRL 11301 +#define ID_TERMSOFUSEDISAGREECTRL 11302 // Account Info Controls #define ID_ACCOUNTCREATECTRL 11400 @@ -132,8 +133,8 @@ // Forward declare the generic page classes // class CWelcomePage; -class CAccountKeyPage; class CAccountInfoPage; +class CTermsOfUsePage; class CCompletionPage; class CCompletionErrorPage; class CErrNotDetectedPage; @@ -164,6 +165,7 @@ class wxHyperLink; #define WIZDEBUG_ERRCLIENTACCOUNTCREATIONDISABLED 0x00000200 #define WIZDEBUG_ERRPROJECTATTACH 0x00000400 #define WIZDEBUG_ERRPROJECTALREADYATTACHED 0x00000800 +#define WIZDEBUG_ERRTERMSOFUSEREQUIRED 0x00001000 #define PROCESS_DEBUG_FLAG(ulFlags) \ ((CBOINCBaseWizard*)GetParent())->SetDiagFlags(ulFlags) diff --git a/clientgui/ProjectProcessingPage.cpp b/clientgui/ProjectProcessingPage.cpp index 6b301eca63..2a9df607a1 100644 --- a/clientgui/ProjectProcessingPage.cpp +++ b/clientgui/ProjectProcessingPage.cpp @@ -36,7 +36,6 @@ #include "WizardAttachProject.h" #include "ProjectProcessingPage.h" #include "ProjectInfoPage.h" -#include "AccountKeyPage.h" #include "AccountInfoPage.h" #include "CompletionErrorPage.h" @@ -384,12 +383,12 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE ai->url = (const char*)pWAP->m_ProjectInfoPage->GetProjectURL().mb_str(); - if (!pWAP->m_AccountKeyPage->m_strAccountKey.IsEmpty() || + if (!pWAP->GetProjectAuthenticator().IsEmpty() || pWAP->m_bCredentialsCached || pWAP->m_bCredentialsDetected ) { if (!pWAP->m_bCredentialsCached || pWAP->m_bCredentialsDetected) { - ao->authenticator = (const char*)pWAP->m_AccountKeyPage->m_strAccountKey.mb_str(); + ao->authenticator = (const char*)pWAP->GetProjectAuthenticator().mb_str(); } SetProjectCommunitcationsSucceeded(true); } else { diff --git a/clientgui/ProjectPropertiesPage.cpp b/clientgui/ProjectPropertiesPage.cpp index 4d96bfef65..9a3ad76953 100644 --- a/clientgui/ProjectPropertiesPage.cpp +++ b/clientgui/ProjectPropertiesPage.cpp @@ -38,6 +38,7 @@ #include "ProjectPropertiesPage.h" #include "ProjectInfoPage.h" #include "CompletionErrorPage.h" +#include "TermsOfUsePage.h" ////@begin XPM images @@ -113,6 +114,7 @@ bool CProjectPropertiesPage::Create( CBOINCBaseWizard* parent ) m_bProjectClientAccountCreationDisabled = false; m_bNetworkConnectionDetected = false; m_bServerReportedError = false; + m_bTermsOfUseRequired = true; m_iBitmapIndex = 0; m_iCurrentState = PROJPROP_INIT; @@ -185,6 +187,9 @@ wxWizardPageEx* CProjectPropertiesPage::GetNext() const } else if (GetProjectPropertiesSucceeded() && GetProjectAlreadyAttached()) { // Already attach to the project return PAGE_TRANSITION_NEXT(ID_ERRALREADYATTACHEDPAGE); + } else if (GetProjectPropertiesSucceeded() && GetTermsOfUseRequired()) { + // Terms of Use are required before requesting account information + return PAGE_TRANSITION_NEXT(ID_TERMSOFUSEPAGE); } else if (GetProjectPropertiesSucceeded()) { // We were successful in retrieving the project properties return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE); @@ -445,6 +450,13 @@ void CProjectPropertiesPage::OnStateChange( CProjectPropertiesPageEvent& WXUNUSE SetProjectClientAccountCreationDisabled(false); } + bSuccessfulCondition = !pc->terms_of_use.empty(); + if (bSuccessfulCondition || CHECK_DEBUG_FLAG(WIZDEBUG_ERRTERMSOFUSEREQUIRED)) { + SetTermsOfUseRequired(true); + } else { + SetTermsOfUseRequired(false); + } + SetNextState(PROJPROP_CLEANUP); } else { SetProjectPropertiesSucceeded(false); diff --git a/clientgui/ProjectPropertiesPage.h b/clientgui/ProjectPropertiesPage.h index 4143a09d15..7cf38bde94 100644 --- a/clientgui/ProjectPropertiesPage.h +++ b/clientgui/ProjectPropertiesPage.h @@ -127,6 +127,9 @@ public: bool GetServerReportedError() const { return m_bServerReportedError ; } void SetServerReportedError(bool value) { m_bServerReportedError = value ; } + bool GetTermsOfUseRequired() const { return m_bTermsOfUseRequired ; } + void SetTermsOfUseRequired(bool value) { m_bTermsOfUseRequired = value ; } + wxInt32 GetCurrentState() const { return m_iCurrentState ; } void SetNextState(wxInt32 value) { m_iCurrentState = value ; } @@ -149,6 +152,7 @@ public: bool m_bProjectAlreadyAttached; bool m_bNetworkConnectionDetected; bool m_bServerReportedError; + bool m_bTermsOfUseRequired; int m_iBitmapIndex; int m_iCurrentState; }; diff --git a/clientgui/ProxyPage.cpp b/clientgui/ProxyPage.cpp index d986f9ce6f..0174291778 100644 --- a/clientgui/ProxyPage.cpp +++ b/clientgui/ProxyPage.cpp @@ -316,9 +316,6 @@ void CErrProxyPage::OnPageChanged( wxWizardExEvent& WXUNUSED(event) ) { wxASSERT(m_pProxyHTTPUsernameCtrl); wxASSERT(m_pProxyHTTPPasswordStaticCtrl); wxASSERT(m_pProxyHTTPPasswordCtrl); -#if 0 - wxASSERT(m_pProxyHTTPAutodetectCtrl); -#endif wxASSERT(m_pProxySOCKSDescriptionCtrl); wxASSERT(m_pProxySOCKSServerStaticCtrl); wxASSERT(m_pProxySOCKSServerCtrl); diff --git a/clientgui/TermsOfUsePage .cpp b/clientgui/TermsOfUsePage .cpp new file mode 100644 index 0000000000..7e1b6273d5 --- /dev/null +++ b/clientgui/TermsOfUsePage .cpp @@ -0,0 +1,257 @@ +// This file is part of BOINC. +// http://boinc.berkeley.edu +// Copyright (C) 2008 University of California +// +// BOINC is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// BOINC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with BOINC. If not, see . +// +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "TermsOfUsePage.h" +#endif + +#include "stdwx.h" +#include "diagnostics.h" +#include "util.h" +#include "mfile.h" +#include "miofile.h" +#include "parse.h" +#include "error_numbers.h" +#include "wizardex.h" +#include "error_numbers.h" +#include "BOINCGUIApp.h" +#include "SkinManager.h" +#include "MainDocument.h" +#include "BOINCWizards.h" +#include "BOINCBaseWizard.h" +#include "TermsOfUsePage.h" + + +/*! + * CTermsOfUsePage type definition + */ + +IMPLEMENT_DYNAMIC_CLASS( CTermsOfUsePage, wxWizardPageEx ) + +/*! + * CTermsOfUsePage event table definition + */ + +BEGIN_EVENT_TABLE( CTermsOfUsePage, wxWizardPageEx ) + +////@begin CTermsOfUsePage event table entries + EVT_WIZARDEX_PAGE_CHANGED( -1, CTermsOfUsePage::OnPageChanged ) + EVT_WIZARDEX_CANCEL( -1, CTermsOfUsePage::OnCancel ) + EVT_RADIOBUTTON( ID_TERMSOFUSEAGREECTRL, CTermsOfUsePage::OnAgree ) + EVT_RADIOBUTTON( ID_TERMSOFUSEDISAGREECTRL, CTermsOfUsePage::OnDisagree ) +////@end CTermsOfUsePage event table entries + +END_EVENT_TABLE() + +/*! + * CTermsOfUsePage constructors + */ + +CTermsOfUsePage::CTermsOfUsePage( ) +{ +} + +CTermsOfUsePage::CTermsOfUsePage( CBOINCBaseWizard* parent ) +{ + Create( parent ); +} + +/*! + * CTermsOfUsePage creator + */ + +bool CTermsOfUsePage::Create( CBOINCBaseWizard* parent ) +{ +////@begin CTermsOfUsePage member initialisation + m_pTitleStaticCtrl = NULL; + m_pDirectionsStaticCtrl = NULL; + m_pTermsOfUseCtrl = NULL; + m_pAgreeCtrl = NULL; + m_pDisagreeCtrl = NULL; +////@end CTermsOfUsePage member initialisation + +////@begin CTermsOfUsePage creation + wxBitmap wizardBitmap(wxNullBitmap); + wxWizardPageEx::Create( parent, ID_TERMSOFUSEPAGE, wizardBitmap ); + + CreateControls(); + GetSizer()->Fit(this); +////@end CTermsOfUsePage creation + + return TRUE; +} + +/*! + * Control creation for CTermsOfUsePage + */ + +void CTermsOfUsePage::CreateControls() +{ +////@begin CTermsOfUsePage content construction + CTermsOfUsePage* itemWizardPage96 = this; + + wxBoxSizer* itemBoxSizer97 = new wxBoxSizer(wxVERTICAL); + itemWizardPage96->SetSizer(itemBoxSizer97); + + m_pTitleStaticCtrl = new wxStaticText; + m_pTitleStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_pTitleStaticCtrl->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana"))); + itemBoxSizer97->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5); + + itemBoxSizer97->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5); + + m_pDirectionsStaticCtrl = new wxStaticText; + m_pDirectionsStaticCtrl->Create( itemWizardPage96, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer97->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5); + + m_pTermsOfUseCtrl = new wxTextCtrl; + m_pTermsOfUseCtrl->Create( itemWizardPage96, ID_TERMSOFUSECTRL, wxEmptyString, wxDefaultPosition, wxSize(300, 125), wxTE_MULTILINE ); + itemBoxSizer97->Add(m_pTermsOfUseCtrl, 0, wxGROW|wxALL, 5); + + m_pAgreeCtrl = new wxRadioButton; + m_pAgreeCtrl->Create( itemWizardPage96, ID_TERMSOFUSEAGREECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_pAgreeCtrl->SetValue(false); + itemBoxSizer97->Add(m_pAgreeCtrl, 0, wxALIGN_LEFT|wxALL, 5); + + m_pDisagreeCtrl = new wxRadioButton; + m_pDisagreeCtrl->Create( itemWizardPage96, ID_TERMSOFUSEDISAGREECTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_pDisagreeCtrl->SetValue(true); + itemBoxSizer97->Add(m_pDisagreeCtrl, 0, wxALIGN_LEFT|wxALL, 5); + +////@end CTermsOfUsePage content construction +} + +/*! + * Gets the previous page. + */ + +wxWizardPageEx* CTermsOfUsePage::GetPrev() const +{ + return PAGE_TRANSITION_BACK; +} + +/*! + * Gets the next page. + */ + +wxWizardPageEx* CTermsOfUsePage::GetNext() const +{ + if (CHECK_CLOSINGINPROGRESS()) { + // Cancel Event Detected + return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE); + } else if (GetUserAgrees()) { + return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE); + } else { + return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE); + } + return NULL; +} + +/*! + * Should we show tooltips? + */ + +bool CTermsOfUsePage::ShowToolTips() +{ + return TRUE; +} + +/*! + * Get bitmap resources + */ + +wxBitmap CTermsOfUsePage::GetBitmapResource( const wxString& WXUNUSED(name) ) +{ + // Bitmap retrieval + +////@begin CTermsOfUsePage bitmap retrieval + return wxNullBitmap; +////@end CTermsOfUsePage bitmap retrieval +} + +/*! + * Get icon resources + */ + +wxIcon CTermsOfUsePage::GetIconResource( const wxString& WXUNUSED(name) ) +{ + // Icon retrieval + +////@begin CTermsOfUsePage icon retrieval + return wxNullIcon; +////@end CTermsOfUsePage icon retrieval +} + +/*! + * wxEVT_WIZARD_PAGE_CHANGED event handler for ID_TERMSOFUSEPAGE + */ + +void CTermsOfUsePage::OnPageChanged( wxWizardExEvent& event ) { + if (event.GetDirection() == false) return; + + PROJECT_CONFIG& pc = ((CBOINCBaseWizard*)GetParent())->project_config; + + wxASSERT(m_pTitleStaticCtrl); + wxASSERT(m_pDirectionsStaticCtrl); + + m_pTitleStaticCtrl->SetLabel( + _("Terms of Use") + ); + + m_pDirectionsStaticCtrl->SetLabel( + _("Please read the following terms of use:") + ); + + m_pTermsOfUseCtrl->SetValue( + wxString(pc.terms_of_use.c_str(), wxConvUTF8) + ); + + m_pAgreeCtrl->SetLabel( + _("I agree to the terms of use.") + ); + + m_pDisagreeCtrl->SetLabel( + _("I disagree with the terms of use.") + ); + + Fit(); +} + +/*! + * wxEVT_WIZARD_CANCEL event handler for ID_TERMSOFUSEPAGE + */ + +void CTermsOfUsePage::OnCancel( wxWizardExEvent& event ) { + PROCESS_CANCELEVENT(event); +} + +/*! + * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL + */ + +void CTermsOfUsePage::OnAgree( wxCommandEvent& /* event */ ) { + SetUserAgrees(true); +} + +/*! + * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEDISAGREECTRL + */ + +void CTermsOfUsePage::OnDisagree( wxCommandEvent& /* event */ ) { + SetUserAgrees(false); +} + diff --git a/clientgui/AccountKeyPage.h b/clientgui/TermsOfUsePage.h similarity index 54% rename from clientgui/AccountKeyPage.h rename to clientgui/TermsOfUsePage.h index 7e4209c9e1..d75a327af9 100644 --- a/clientgui/AccountKeyPage.h +++ b/clientgui/TermsOfUsePage.h @@ -1,88 +1,93 @@ -// This file is part of BOINC. -// http://boinc.berkeley.edu -// Copyright (C) 2008 University of California -// -// BOINC is free software; you can redistribute it and/or modify it -// under the terms of the GNU Lesser General Public License -// as published by the Free Software Foundation, -// either version 3 of the License, or (at your option) any later version. -// -// BOINC is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -// See the GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with BOINC. If not, see . -// -#ifndef _WIZ_ACCOUNTKEYPAGE_H_ -#define _WIZ_ACCOUNTKEYPAGE_H_ - -#if defined(__GNUG__) && !defined(__APPLE__) -#pragma interface "AccountKeyPage.cpp" -#endif - -/*! - * CAccountKeyPage class declaration - */ - -class CAccountKeyPage: public wxWizardPageEx -{ - DECLARE_DYNAMIC_CLASS( CAccountKeyPage ) - DECLARE_EVENT_TABLE() - -public: - /// Constructors - CAccountKeyPage( ); - - CAccountKeyPage( CBOINCBaseWizard* parent ); - - /// Creation - bool Create( CBOINCBaseWizard* parent ); - - /// Creates the controls and sizers - void CreateControls(); - -////@begin CAccountKeyPage event handler declarations - - /// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ACCOUNTKEYPAGE - void OnPageChanged( wxWizardExEvent& event ); - - /// wxEVT_WIZARD_CANCEL event handler for ID_ACCOUNTKEYPAGE - void OnCancel( wxWizardExEvent& event ); - -////@end CAccountKeyPage event handler declarations - -////@begin CAccountKeyPage member function declarations - - /// Gets the previous page. - virtual wxWizardPageEx* GetPrev() const; - - /// Gets the next page. - virtual wxWizardPageEx* GetNext() const; - - wxString GetAccountKey() const { return m_strAccountKey ; } - void SetAccountKey(wxString value) { m_strAccountKey = value ; } - - /// Retrieves bitmap resources - wxBitmap GetBitmapResource( const wxString& name ); - - /// Retrieves icon resources - wxIcon GetIconResource( const wxString& name ); -////@end CAccountKeyPage member function declarations - - /// Should we show tooltips? - static bool ShowToolTips(); - -////@begin CAccountKeyPage member variables - wxStaticText* m_pTitleStaticCtrl; - wxStaticText* m_pDirectionsStaticCtrl; - wxStaticText* m_pAccountKeyExampleDescriptionStaticCtrl; - wxStaticText* m_pAccountKeyExampleStaticCtrl; - wxStaticText* m_pAccountKeyStaticCtrl; - wxTextCtrl* m_pAccountKeyCtrl; - wxString m_strAccountKey; -////@end CAccountKeyPage member variables -}; - -#endif // _WIZ_ACCOUNTKEYPAGE_H_ +// This file is part of BOINC. +// http://boinc.berkeley.edu +// Copyright (C) 2008 University of California +// +// BOINC is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License +// as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// BOINC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with BOINC. If not, see . +// +#ifndef _WIZ_TERMSOFUSEPAGE_H_ +#define _WIZ_TERMSOFUSEPAGE_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "TermsOfUsePage.cpp" +#endif + +/*! + * CTermsOfUsePage class declaration + */ + +class CTermsOfUsePage: public wxWizardPageEx +{ + DECLARE_DYNAMIC_CLASS( CTermsOfUsePage ) + DECLARE_EVENT_TABLE() + +public: + /// Constructors + CTermsOfUsePage( ); + + CTermsOfUsePage( CBOINCBaseWizard* parent ); + + /// Creation + bool Create( CBOINCBaseWizard* parent ); + + /// Creates the controls and sizers + void CreateControls(); + +////@begin CTermsOfUsePage event handler declarations + + /// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_TERMSOFUSEPAGE + void OnPageChanged( wxWizardExEvent& event ); + + /// wxEVT_WIZARD_CANCEL event handler for ID_TERMSOFUSEPAGE + void OnCancel( wxWizardExEvent& event ); + + /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL + void OnAgree( wxCommandEvent& event ); + + /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEDISAGREECTRL + void OnDisagree( wxCommandEvent& event ); + +////@end CTermsOfUsePage event handler declarations + +////@begin CTermsOfUsePage member function declarations + + /// Gets the previous page. + virtual wxWizardPageEx* GetPrev() const; + + /// Gets the next page. + virtual wxWizardPageEx* GetNext() const; + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end CTermsOfUsePage member function declarations + + bool GetUserAgrees() const { return m_bUserAgrees ; } + void SetUserAgrees(bool value) { m_bUserAgrees = value ; } + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin CTermsOfUsePage member variables + wxStaticText* m_pTitleStaticCtrl; + wxStaticText* m_pDirectionsStaticCtrl; + wxTextCtrl* m_pTermsOfUseCtrl; + wxRadioButton* m_pAgreeCtrl; + wxRadioButton* m_pDisagreeCtrl; +////@end CTermsOfUsePage member variables + bool m_bUserAgrees; +}; + +#endif diff --git a/clientgui/WizardAccountManager.cpp b/clientgui/WizardAccountManager.cpp index b58101a645..f29e73e955 100644 --- a/clientgui/WizardAccountManager.cpp +++ b/clientgui/WizardAccountManager.cpp @@ -40,6 +40,7 @@ #include "AccountManagerInfoPage.h" #include "AccountManagerPropertiesPage.h" #include "AccountManagerProcessingPage.h" +#include "TermsOfUsePage.h" #include "AccountInfoPage.h" #include "CompletionPage.h" #include "CompletionErrorPage.h" @@ -94,6 +95,7 @@ bool CWizardAccountManager::Create( wxWindow* parent, wxWindowID id, const wxPoi m_AccountManagerInfoPage = NULL; m_AccountManagerPropertiesPage = NULL; m_AccountManagerProcessingPage = NULL; + m_TermsOfUsePage = NULL; m_AccountInfoPage = NULL; m_CompletionPage = NULL; m_CompletionErrorPage = NULL; @@ -173,13 +175,17 @@ void CWizardAccountManager::CreateControls() m_AccountManagerPropertiesPage->Create( itemWizard1 ); GetPageAreaSizer()->Add(m_AccountManagerPropertiesPage); + m_AccountManagerProcessingPage = new CAccountManagerProcessingPage; + m_AccountManagerProcessingPage->Create( itemWizard1 ); + GetPageAreaSizer()->Add(m_AccountManagerProcessingPage); + m_AccountInfoPage = new CAccountInfoPage; m_AccountInfoPage->Create( itemWizard1 ); GetPageAreaSizer()->Add(m_AccountInfoPage); - m_AccountManagerProcessingPage = new CAccountManagerProcessingPage; - m_AccountManagerProcessingPage->Create( itemWizard1 ); - GetPageAreaSizer()->Add(m_AccountManagerProcessingPage); + m_TermsOfUsePage = new CTermsOfUsePage; + m_TermsOfUsePage->Create( itemWizard1 ); + GetPageAreaSizer()->Add(m_TermsOfUsePage); m_CompletionPage = new CCompletionPage; m_CompletionPage->Create( itemWizard1 ); @@ -219,8 +225,9 @@ void CWizardAccountManager::CreateControls() wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_WelcomePage = id: '%d', location: '%p'"), m_WelcomePage->GetId(), m_WelcomePage); wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_AccountManagerInfoPage = id: '%d', location: '%p'"), m_AccountManagerInfoPage->GetId(), m_AccountManagerInfoPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_AccountManagerPropertiesPage = id: '%d', location: '%p'"), m_AccountManagerPropertiesPage->GetId(), m_AccountManagerPropertiesPage); - wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_AccountInfoPage = id: '%d', location: '%p'"), m_AccountInfoPage->GetId(), m_AccountInfoPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_AccountManagerProcessingPage = id: '%d', location: '%p'"), m_AccountManagerProcessingPage->GetId(), m_AccountManagerProcessingPage); + wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_TermsOfUsePage = id: '%d', location: '%p'"), m_TermsOfUsePage->GetId(), m_TermsOfUsePage); + wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_AccountInfoPage = id: '%d', location: '%p'"), m_AccountInfoPage->GetId(), m_AccountInfoPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_CompletionPage = id: '%d', location: '%p'"), m_CompletionPage->GetId(), m_CompletionPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_CompletionErrorPage = id: '%d', location: '%p'"), m_CompletionErrorPage->GetId(), m_CompletionErrorPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAccountManager::CreateControls - m_ErrNotDetectedPage = id: '%d', location: '%p'"), m_ErrNotDetectedPage->GetId(), m_ErrNotDetectedPage); @@ -382,12 +389,15 @@ wxWizardPageEx* CWizardAccountManager::_PushPageTransition( wxWizardPageEx* pCur if (ID_ACCOUNTMANAGERPROPERTIESPAGE == ulPageID) pPage = m_AccountManagerPropertiesPage; - if (ID_ACCOUNTINFOPAGE == ulPageID) - pPage = m_AccountInfoPage; - if (ID_ACCOUNTMANAGERPROCESSINGPAGE == ulPageID) pPage = m_AccountManagerProcessingPage; + if (ID_TERMSOFUSEPAGE == ulPageID) + pPage = m_TermsOfUsePage; + + if (ID_ACCOUNTINFOPAGE == ulPageID) + pPage = m_AccountInfoPage; + if (ID_COMPLETIONPAGE == ulPageID) pPage = m_CompletionPage; diff --git a/clientgui/WizardAccountManager.h b/clientgui/WizardAccountManager.h index 8bcf7d7dc6..0d18f229a1 100644 --- a/clientgui/WizardAccountManager.h +++ b/clientgui/WizardAccountManager.h @@ -107,6 +107,7 @@ public: CAccountManagerInfoPage* m_AccountManagerInfoPage; CAccountManagerPropertiesPage* m_AccountManagerPropertiesPage; CAccountManagerProcessingPage* m_AccountManagerProcessingPage; + CTermsOfUsePage* m_TermsOfUsePage; CAccountInfoPage* m_AccountInfoPage; CCompletionPage* m_CompletionPage; CCompletionErrorPage* m_CompletionErrorPage; diff --git a/clientgui/WizardAttachProject.cpp b/clientgui/WizardAttachProject.cpp index 5bdffe9d02..0e0ae5097f 100644 --- a/clientgui/WizardAttachProject.cpp +++ b/clientgui/WizardAttachProject.cpp @@ -40,9 +40,9 @@ #include "WelcomePage.h" #include "ProjectInfoPage.h" #include "ProjectPropertiesPage.h" -#include "AccountInfoPage.h" -#include "AccountKeyPage.h" #include "ProjectProcessingPage.h" +#include "TermsOfUsePage.h" +#include "AccountInfoPage.h" #include "CompletionPage.h" #include "CompletionErrorPage.h" #include "NotDetectedPage.h" @@ -102,9 +102,9 @@ bool CWizardAttachProject::Create( wxWindow* parent, wxWindowID id, const wxPoin m_WelcomePage = NULL; m_ProjectInfoPage = NULL; m_ProjectPropertiesPage = NULL; - m_AccountKeyPage = NULL; - m_AccountInfoPage = NULL; m_ProjectProcessingPage = NULL; + m_TermsOfUsePage = NULL; + m_AccountInfoPage = NULL; m_CompletionPage = NULL; m_CompletionErrorPage = NULL; m_ErrNotDetectedPage = NULL; @@ -191,17 +191,17 @@ void CWizardAttachProject::CreateControls() m_ProjectPropertiesPage->Create( itemWizard1 ); GetPageAreaSizer()->Add(m_ProjectPropertiesPage); - m_AccountKeyPage = new CAccountKeyPage; - m_AccountKeyPage->Create( itemWizard1 ); - GetPageAreaSizer()->Add(m_AccountKeyPage); + m_ProjectProcessingPage = new CProjectProcessingPage; + m_ProjectProcessingPage->Create( itemWizard1 ); + GetPageAreaSizer()->Add(m_ProjectProcessingPage); m_AccountInfoPage = new CAccountInfoPage; m_AccountInfoPage->Create( itemWizard1 ); GetPageAreaSizer()->Add(m_AccountInfoPage); - m_ProjectProcessingPage = new CProjectProcessingPage; - m_ProjectProcessingPage->Create( itemWizard1 ); - GetPageAreaSizer()->Add(m_ProjectProcessingPage); + m_TermsOfUsePage = new CTermsOfUsePage; + m_TermsOfUsePage->Create( itemWizard1 ); + GetPageAreaSizer()->Add(m_TermsOfUsePage); m_CompletionPage = new CCompletionPage; m_CompletionPage->Create( itemWizard1 ); @@ -244,14 +244,13 @@ void CWizardAttachProject::CreateControls() GetPageAreaSizer()->Add(m_ErrProxyPage); ////@end CWizardAttachProject content construction - wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - Begin Page Map")); wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_WelcomePage = id: '%d', location: '%p'"), m_WelcomePage->GetId(), m_WelcomePage); wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_ProjectInfoPage = id: '%d', location: '%p'"), m_ProjectInfoPage->GetId(), m_ProjectInfoPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_ProjectPropertiesPage = id: '%d', location: '%p'"), m_ProjectPropertiesPage->GetId(), m_ProjectPropertiesPage); - wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_AccountKeyPage = id: '%d', location: '%p'"), m_AccountKeyPage->GetId(), m_AccountKeyPage); - wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_AccountInfoPage = id: '%d', location: '%p'"), m_AccountInfoPage->GetId(), m_AccountInfoPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_ProjectProcessingPage = id: '%d', location: '%p'"), m_ProjectProcessingPage->GetId(), m_ProjectProcessingPage); + wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_TermsOfUsePage = id: '%d', location: '%p'"), m_TermsOfUsePage->GetId(), m_TermsOfUsePage); + wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_AccountInfoPage = id: '%d', location: '%p'"), m_AccountInfoPage->GetId(), m_AccountInfoPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_CompletionPage = id: '%d', location: '%p'"), m_CompletionPage->GetId(), m_CompletionPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_CompletionErrorPage = id: '%d', location: '%p'"), m_CompletionErrorPage->GetId(), m_CompletionErrorPage); wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - m_ErrNotDetectedPage = id: '%d', location: '%p'"), m_ErrNotDetectedPage->GetId(), m_ErrNotDetectedPage); @@ -287,7 +286,7 @@ bool CWizardAttachProject::Run( wxString& WXUNUSED(strName), wxString& strURL, b if (detect_setup_authenticator(url, authenticator)) { m_bCredentialsDetected = true; close_when_completed = true; - m_AccountKeyPage->m_strAccountKey = wxString(authenticator.c_str(), wxConvUTF8); + SetProjectAuthenticator(wxString(authenticator.c_str(), wxConvUTF8)); } } @@ -405,15 +404,15 @@ wxWizardPageEx* CWizardAttachProject::_PushPageTransition( wxWizardPageEx* pCurr if (ID_PROJECTPROPERTIESPAGE == ulPageID) pPage = m_ProjectPropertiesPage; - if (ID_ACCOUNTINFOPAGE == ulPageID) - pPage = m_AccountInfoPage; - - if (ID_ACCOUNTKEYPAGE == ulPageID) - pPage = m_AccountKeyPage; - if (ID_PROJECTPROCESSINGPAGE == ulPageID) pPage = m_ProjectProcessingPage; + if (ID_TERMSOFUSEPAGE == ulPageID) + pPage = m_TermsOfUsePage; + + if (ID_ACCOUNTINFOPAGE == ulPageID) + pPage = m_AccountInfoPage; + if (ID_COMPLETIONPAGE == ulPageID) pPage = m_CompletionPage; @@ -477,8 +476,6 @@ void CWizardAttachProject::_ProcessCancelEvent( wxWizardExEvent& event ) { if (wxYES == iRetVal) { if (page == m_ProjectInfoPage) { m_ProjectInfoPage->m_pProjectUrlCtrl->SetValidator(wxDefaultValidator); - } else if (page == m_AccountKeyPage) { - m_AccountKeyPage->m_pAccountKeyCtrl->SetValidator(wxDefaultValidator); } else if (page == m_AccountInfoPage) { m_AccountInfoPage->m_pAccountEmailAddressCtrl->SetValidator(wxDefaultValidator); m_AccountInfoPage->m_pAccountPasswordCtrl->SetValidator(wxDefaultValidator); diff --git a/clientgui/WizardAttachProject.h b/clientgui/WizardAttachProject.h index f35c51d882..2448afc925 100644 --- a/clientgui/WizardAttachProject.h +++ b/clientgui/WizardAttachProject.h @@ -108,9 +108,9 @@ public: CWelcomePage* m_WelcomePage; CProjectInfoPage* m_ProjectInfoPage; CProjectPropertiesPage* m_ProjectPropertiesPage; - CAccountKeyPage* m_AccountKeyPage; - CAccountInfoPage* m_AccountInfoPage; CProjectProcessingPage* m_ProjectProcessingPage; + CTermsOfUsePage* m_TermsOfUsePage; + CAccountInfoPage* m_AccountInfoPage; CCompletionPage* m_CompletionPage; CCompletionErrorPage* m_CompletionErrorPage; CErrNotDetectedPage* m_ErrNotDetectedPage; @@ -124,7 +124,7 @@ public: ////@end CWizardAttachProject member variables bool m_bCredentialsCached; bool m_bCredentialsDetected; - wxString strProjectName; + wxString m_strProjectName; }; #endif // _WIZ_ATTACHPROJECT_H_ diff --git a/win_build/boincmgr_curl.vcproj b/win_build/boincmgr_curl.vcproj index 0291fe9a4e..064d4ce672 100644 --- a/win_build/boincmgr_curl.vcproj +++ b/win_build/boincmgr_curl.vcproj @@ -3060,14 +3060,6 @@ RelativePath="..\clientgui\AccountInfoPage.h" > - - - - @@ -3188,6 +3180,14 @@ RelativePath="..\clientgui\ProxyPage.h" > + + + +