- 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

svn path=/trunk/boinc/; revision=16560
This commit is contained in:
Rom Walton 2008-11-25 22:58:14 +00:00
parent 372dd820ad
commit 08a41ed986
17 changed files with 459 additions and 391 deletions

View File

@ -9617,3 +9617,21 @@ David 25 Nov 2008
client/ client/
cs_platforms.cpp 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

View File

@ -60,7 +60,6 @@ BEGIN_EVENT_TABLE( CAccountInfoPage, wxWizardPageEx )
EVT_WIZARDEX_PAGE_CHANGED( -1, CAccountInfoPage::OnPageChanged ) EVT_WIZARDEX_PAGE_CHANGED( -1, CAccountInfoPage::OnPageChanged )
EVT_WIZARDEX_PAGE_CHANGING( -1, CAccountInfoPage::OnPageChanging ) EVT_WIZARDEX_PAGE_CHANGING( -1, CAccountInfoPage::OnPageChanging )
EVT_WIZARDEX_CANCEL( -1, CAccountInfoPage::OnCancel ) EVT_WIZARDEX_CANCEL( -1, CAccountInfoPage::OnCancel )
EVT_RADIOBUTTON( ID_ACCOUNTCREATECTRL, CAccountInfoPage::OnAccountCreateCtrlSelected ) EVT_RADIOBUTTON( ID_ACCOUNTCREATECTRL, CAccountInfoPage::OnAccountCreateCtrlSelected )
EVT_RADIOBUTTON( ID_ACCOUNTUSEEXISTINGCTRL, CAccountInfoPage::OnAccountUseExistingCtrlSelected ) EVT_RADIOBUTTON( ID_ACCOUNTUSEEXISTINGCTRL, CAccountInfoPage::OnAccountUseExistingCtrlSelected )
////@end CAccountInfoPage event table entries ////@end CAccountInfoPage event table entries
@ -417,9 +416,9 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& event ) {
m_pAccountEmailAddressCtrl->SetValidator( CValidateEmailAddress(& m_strAccountEmailAddress) ); m_pAccountEmailAddressCtrl->SetValidator( CValidateEmailAddress(& m_strAccountEmailAddress) );
} }
if (((CBOINCBaseWizard*)GetParent())->project_config.min_passwd_length) { if (pc.min_passwd_length) {
wxString str; 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 ); m_pAccountPasswordRequirmentsStaticCtrl->SetLabel( str );
} }

View File

@ -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 <http://www.gnu.org/licenses/>.
//
#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);
}

View File

@ -38,6 +38,7 @@
#include "AccountManagerPropertiesPage.h" #include "AccountManagerPropertiesPage.h"
#include "AccountManagerInfoPage.h" #include "AccountManagerInfoPage.h"
#include "CompletionErrorPage.h" #include "CompletionErrorPage.h"
#include "TermsOfUsePage.h"
////@begin XPM images ////@begin XPM images
@ -114,6 +115,7 @@ bool CAccountManagerPropertiesPage::Create( CBOINCBaseWizard* parent )
m_bProjectClientAccountCreationDisabled = false; m_bProjectClientAccountCreationDisabled = false;
m_bNetworkConnectionDetected = false; m_bNetworkConnectionDetected = false;
m_bServerReportedError = false; m_bServerReportedError = false;
m_bTermsOfUseRequired = true;
m_iBitmapIndex = 0; m_iBitmapIndex = 0;
m_iCurrentState = ACCTMGRPROP_INIT; m_iCurrentState = ACCTMGRPROP_INIT;
@ -307,6 +309,13 @@ void CAccountManagerPropertiesPage::OnStateChange( CAccountManagerPropertiesPage
SetProjectClientAccountCreationDisabled(false); 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); pWAM->m_strProjectName = wxString(pc->name.c_str(), wxConvUTF8);
SetNextState(ACCTMGRPROP_CLEANUP); SetNextState(ACCTMGRPROP_CLEANUP);
@ -419,6 +428,9 @@ wxWizardPageEx* CAccountManagerPropertiesPage::GetNext() const
if (CHECK_CLOSINGINPROGRESS()) { if (CHECK_CLOSINGINPROGRESS()) {
// Cancel Event Detected // Cancel Event Detected
return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE); 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()) { } else if (GetProjectPropertiesSucceeded()) {
// We were successful in retrieving the project properties // We were successful in retrieving the project properties
return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE); return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE);

View File

@ -124,6 +124,9 @@ public:
bool GetServerReportedError() const { return m_bServerReportedError ; } bool GetServerReportedError() const { return m_bServerReportedError ; }
void SetServerReportedError(bool value) { m_bServerReportedError = value ; } 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 ; } wxInt32 GetCurrentState() const { return m_iCurrentState ; }
void SetNextState(wxInt32 value) { m_iCurrentState = value ; } void SetNextState(wxInt32 value) { m_iCurrentState = value ; }
@ -146,6 +149,7 @@ public:
bool m_bProjectClientAccountCreationDisabled; bool m_bProjectClientAccountCreationDisabled;
bool m_bNetworkConnectionDetected; bool m_bNetworkConnectionDetected;
bool m_bServerReportedError; bool m_bServerReportedError;
bool m_bTermsOfUseRequired;
int m_iBitmapIndex; int m_iBitmapIndex;
int m_iCurrentState; int m_iCurrentState;
}; };

View File

@ -30,7 +30,7 @@
// Generic Pages // Generic Pages
#define ID_WELCOMEPAGE 10100 #define ID_WELCOMEPAGE 10100
#define ID_ACCOUNTKEYPAGE 10101 #define ID_TERMSOFUSEPAGE 10113
#define ID_ACCOUNTINFOPAGE 10102 #define ID_ACCOUNTINFOPAGE 10102
#define ID_COMPLETIONPAGE 10103 #define ID_COMPLETIONPAGE 10103
#define ID_COMPLETIONERRORPAGE 10104 #define ID_COMPLETIONERRORPAGE 10104
@ -87,9 +87,10 @@
#define ID_PROJECTURLDESCRIPTIONSTATICCTRL 11202 #define ID_PROJECTURLDESCRIPTIONSTATICCTRL 11202
#define ID_PROJECTURLCTRL 11203 #define ID_PROJECTURLCTRL 11203
// Account Key Controls // Terms Of Use Controls
#define ID_ACCOUNTKEYSTATICCTRL 11300 #define ID_TERMSOFUSECTRL 11300
#define ID_ACCOUNTKEYCTRL 11301 #define ID_TERMSOFUSEAGREECTRL 11301
#define ID_TERMSOFUSEDISAGREECTRL 11302
// Account Info Controls // Account Info Controls
#define ID_ACCOUNTCREATECTRL 11400 #define ID_ACCOUNTCREATECTRL 11400
@ -132,8 +133,8 @@
// Forward declare the generic page classes // Forward declare the generic page classes
// //
class CWelcomePage; class CWelcomePage;
class CAccountKeyPage;
class CAccountInfoPage; class CAccountInfoPage;
class CTermsOfUsePage;
class CCompletionPage; class CCompletionPage;
class CCompletionErrorPage; class CCompletionErrorPage;
class CErrNotDetectedPage; class CErrNotDetectedPage;
@ -164,6 +165,7 @@ class wxHyperLink;
#define WIZDEBUG_ERRCLIENTACCOUNTCREATIONDISABLED 0x00000200 #define WIZDEBUG_ERRCLIENTACCOUNTCREATIONDISABLED 0x00000200
#define WIZDEBUG_ERRPROJECTATTACH 0x00000400 #define WIZDEBUG_ERRPROJECTATTACH 0x00000400
#define WIZDEBUG_ERRPROJECTALREADYATTACHED 0x00000800 #define WIZDEBUG_ERRPROJECTALREADYATTACHED 0x00000800
#define WIZDEBUG_ERRTERMSOFUSEREQUIRED 0x00001000
#define PROCESS_DEBUG_FLAG(ulFlags) \ #define PROCESS_DEBUG_FLAG(ulFlags) \
((CBOINCBaseWizard*)GetParent())->SetDiagFlags(ulFlags) ((CBOINCBaseWizard*)GetParent())->SetDiagFlags(ulFlags)

View File

@ -36,7 +36,6 @@
#include "WizardAttachProject.h" #include "WizardAttachProject.h"
#include "ProjectProcessingPage.h" #include "ProjectProcessingPage.h"
#include "ProjectInfoPage.h" #include "ProjectInfoPage.h"
#include "AccountKeyPage.h"
#include "AccountInfoPage.h" #include "AccountInfoPage.h"
#include "CompletionErrorPage.h" #include "CompletionErrorPage.h"
@ -384,12 +383,12 @@ void CProjectProcessingPage::OnStateChange( CProjectProcessingPageEvent& WXUNUSE
ai->url = (const char*)pWAP->m_ProjectInfoPage->GetProjectURL().mb_str(); 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_bCredentialsCached ||
pWAP->m_bCredentialsDetected pWAP->m_bCredentialsDetected
) { ) {
if (!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); SetProjectCommunitcationsSucceeded(true);
} else { } else {

View File

@ -38,6 +38,7 @@
#include "ProjectPropertiesPage.h" #include "ProjectPropertiesPage.h"
#include "ProjectInfoPage.h" #include "ProjectInfoPage.h"
#include "CompletionErrorPage.h" #include "CompletionErrorPage.h"
#include "TermsOfUsePage.h"
////@begin XPM images ////@begin XPM images
@ -113,6 +114,7 @@ bool CProjectPropertiesPage::Create( CBOINCBaseWizard* parent )
m_bProjectClientAccountCreationDisabled = false; m_bProjectClientAccountCreationDisabled = false;
m_bNetworkConnectionDetected = false; m_bNetworkConnectionDetected = false;
m_bServerReportedError = false; m_bServerReportedError = false;
m_bTermsOfUseRequired = true;
m_iBitmapIndex = 0; m_iBitmapIndex = 0;
m_iCurrentState = PROJPROP_INIT; m_iCurrentState = PROJPROP_INIT;
@ -185,6 +187,9 @@ wxWizardPageEx* CProjectPropertiesPage::GetNext() const
} else if (GetProjectPropertiesSucceeded() && GetProjectAlreadyAttached()) { } else if (GetProjectPropertiesSucceeded() && GetProjectAlreadyAttached()) {
// Already attach to the project // Already attach to the project
return PAGE_TRANSITION_NEXT(ID_ERRALREADYATTACHEDPAGE); 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()) { } else if (GetProjectPropertiesSucceeded()) {
// We were successful in retrieving the project properties // We were successful in retrieving the project properties
return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE); return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE);
@ -445,6 +450,13 @@ void CProjectPropertiesPage::OnStateChange( CProjectPropertiesPageEvent& WXUNUSE
SetProjectClientAccountCreationDisabled(false); SetProjectClientAccountCreationDisabled(false);
} }
bSuccessfulCondition = !pc->terms_of_use.empty();
if (bSuccessfulCondition || CHECK_DEBUG_FLAG(WIZDEBUG_ERRTERMSOFUSEREQUIRED)) {
SetTermsOfUseRequired(true);
} else {
SetTermsOfUseRequired(false);
}
SetNextState(PROJPROP_CLEANUP); SetNextState(PROJPROP_CLEANUP);
} else { } else {
SetProjectPropertiesSucceeded(false); SetProjectPropertiesSucceeded(false);

View File

@ -127,6 +127,9 @@ public:
bool GetServerReportedError() const { return m_bServerReportedError ; } bool GetServerReportedError() const { return m_bServerReportedError ; }
void SetServerReportedError(bool value) { m_bServerReportedError = value ; } 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 ; } wxInt32 GetCurrentState() const { return m_iCurrentState ; }
void SetNextState(wxInt32 value) { m_iCurrentState = value ; } void SetNextState(wxInt32 value) { m_iCurrentState = value ; }
@ -149,6 +152,7 @@ public:
bool m_bProjectAlreadyAttached; bool m_bProjectAlreadyAttached;
bool m_bNetworkConnectionDetected; bool m_bNetworkConnectionDetected;
bool m_bServerReportedError; bool m_bServerReportedError;
bool m_bTermsOfUseRequired;
int m_iBitmapIndex; int m_iBitmapIndex;
int m_iCurrentState; int m_iCurrentState;
}; };

View File

@ -316,9 +316,6 @@ void CErrProxyPage::OnPageChanged( wxWizardExEvent& WXUNUSED(event) ) {
wxASSERT(m_pProxyHTTPUsernameCtrl); wxASSERT(m_pProxyHTTPUsernameCtrl);
wxASSERT(m_pProxyHTTPPasswordStaticCtrl); wxASSERT(m_pProxyHTTPPasswordStaticCtrl);
wxASSERT(m_pProxyHTTPPasswordCtrl); wxASSERT(m_pProxyHTTPPasswordCtrl);
#if 0
wxASSERT(m_pProxyHTTPAutodetectCtrl);
#endif
wxASSERT(m_pProxySOCKSDescriptionCtrl); wxASSERT(m_pProxySOCKSDescriptionCtrl);
wxASSERT(m_pProxySOCKSServerStaticCtrl); wxASSERT(m_pProxySOCKSServerStaticCtrl);
wxASSERT(m_pProxySOCKSServerCtrl); wxASSERT(m_pProxySOCKSServerCtrl);

View File

@ -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 <http://www.gnu.org/licenses/>.
//
#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);
}

View File

@ -1,88 +1,93 @@
// This file is part of BOINC. // This file is part of BOINC.
// http://boinc.berkeley.edu // http://boinc.berkeley.edu
// Copyright (C) 2008 University of California // Copyright (C) 2008 University of California
// //
// BOINC is free software; you can redistribute it and/or modify it // BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License // under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation, // as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version. // either version 3 of the License, or (at your option) any later version.
// //
// BOINC is distributed in the hope that it will be useful, // BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details. // See the GNU Lesser General Public License for more details.
// //
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>. // along with BOINC. If not, see <http://www.gnu.org/licenses/>.
// //
#ifndef _WIZ_ACCOUNTKEYPAGE_H_ #ifndef _WIZ_TERMSOFUSEPAGE_H_
#define _WIZ_ACCOUNTKEYPAGE_H_ #define _WIZ_TERMSOFUSEPAGE_H_
#if defined(__GNUG__) && !defined(__APPLE__) #if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "AccountKeyPage.cpp" #pragma interface "TermsOfUsePage.cpp"
#endif #endif
/*! /*!
* CAccountKeyPage class declaration * CTermsOfUsePage class declaration
*/ */
class CAccountKeyPage: public wxWizardPageEx class CTermsOfUsePage: public wxWizardPageEx
{ {
DECLARE_DYNAMIC_CLASS( CAccountKeyPage ) DECLARE_DYNAMIC_CLASS( CTermsOfUsePage )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
public: public:
/// Constructors /// Constructors
CAccountKeyPage( ); CTermsOfUsePage( );
CAccountKeyPage( CBOINCBaseWizard* parent ); CTermsOfUsePage( CBOINCBaseWizard* parent );
/// Creation /// Creation
bool Create( CBOINCBaseWizard* parent ); bool Create( CBOINCBaseWizard* parent );
/// Creates the controls and sizers /// Creates the controls and sizers
void CreateControls(); void CreateControls();
////@begin CAccountKeyPage event handler declarations ////@begin CTermsOfUsePage event handler declarations
/// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ACCOUNTKEYPAGE /// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_TERMSOFUSEPAGE
void OnPageChanged( wxWizardExEvent& event ); void OnPageChanged( wxWizardExEvent& event );
/// wxEVT_WIZARD_CANCEL event handler for ID_ACCOUNTKEYPAGE /// wxEVT_WIZARD_CANCEL event handler for ID_TERMSOFUSEPAGE
void OnCancel( wxWizardExEvent& event ); void OnCancel( wxWizardExEvent& event );
////@end CAccountKeyPage event handler declarations /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEAGREECTRL
void OnAgree( wxCommandEvent& event );
////@begin CAccountKeyPage member function declarations
/// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_TERMSOFUSEDISAGREECTRL
/// Gets the previous page. void OnDisagree( wxCommandEvent& event );
virtual wxWizardPageEx* GetPrev() const;
////@end CTermsOfUsePage event handler declarations
/// Gets the next page.
virtual wxWizardPageEx* GetNext() const; ////@begin CTermsOfUsePage member function declarations
wxString GetAccountKey() const { return m_strAccountKey ; } /// Gets the previous page.
void SetAccountKey(wxString value) { m_strAccountKey = value ; } virtual wxWizardPageEx* GetPrev() const;
/// Retrieves bitmap resources /// Gets the next page.
wxBitmap GetBitmapResource( const wxString& name ); virtual wxWizardPageEx* GetNext() const;
/// Retrieves icon resources /// Retrieves bitmap resources
wxIcon GetIconResource( const wxString& name ); wxBitmap GetBitmapResource( const wxString& name );
////@end CAccountKeyPage member function declarations
/// Retrieves icon resources
/// Should we show tooltips? wxIcon GetIconResource( const wxString& name );
static bool ShowToolTips(); ////@end CTermsOfUsePage member function declarations
////@begin CAccountKeyPage member variables bool GetUserAgrees() const { return m_bUserAgrees ; }
wxStaticText* m_pTitleStaticCtrl; void SetUserAgrees(bool value) { m_bUserAgrees = value ; }
wxStaticText* m_pDirectionsStaticCtrl;
wxStaticText* m_pAccountKeyExampleDescriptionStaticCtrl; /// Should we show tooltips?
wxStaticText* m_pAccountKeyExampleStaticCtrl; static bool ShowToolTips();
wxStaticText* m_pAccountKeyStaticCtrl;
wxTextCtrl* m_pAccountKeyCtrl; ////@begin CTermsOfUsePage member variables
wxString m_strAccountKey; wxStaticText* m_pTitleStaticCtrl;
////@end CAccountKeyPage member variables wxStaticText* m_pDirectionsStaticCtrl;
}; wxTextCtrl* m_pTermsOfUseCtrl;
wxRadioButton* m_pAgreeCtrl;
#endif // _WIZ_ACCOUNTKEYPAGE_H_ wxRadioButton* m_pDisagreeCtrl;
////@end CTermsOfUsePage member variables
bool m_bUserAgrees;
};
#endif

View File

@ -40,6 +40,7 @@
#include "AccountManagerInfoPage.h" #include "AccountManagerInfoPage.h"
#include "AccountManagerPropertiesPage.h" #include "AccountManagerPropertiesPage.h"
#include "AccountManagerProcessingPage.h" #include "AccountManagerProcessingPage.h"
#include "TermsOfUsePage.h"
#include "AccountInfoPage.h" #include "AccountInfoPage.h"
#include "CompletionPage.h" #include "CompletionPage.h"
#include "CompletionErrorPage.h" #include "CompletionErrorPage.h"
@ -94,6 +95,7 @@ bool CWizardAccountManager::Create( wxWindow* parent, wxWindowID id, const wxPoi
m_AccountManagerInfoPage = NULL; m_AccountManagerInfoPage = NULL;
m_AccountManagerPropertiesPage = NULL; m_AccountManagerPropertiesPage = NULL;
m_AccountManagerProcessingPage = NULL; m_AccountManagerProcessingPage = NULL;
m_TermsOfUsePage = NULL;
m_AccountInfoPage = NULL; m_AccountInfoPage = NULL;
m_CompletionPage = NULL; m_CompletionPage = NULL;
m_CompletionErrorPage = NULL; m_CompletionErrorPage = NULL;
@ -173,13 +175,17 @@ void CWizardAccountManager::CreateControls()
m_AccountManagerPropertiesPage->Create( itemWizard1 ); m_AccountManagerPropertiesPage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_AccountManagerPropertiesPage); GetPageAreaSizer()->Add(m_AccountManagerPropertiesPage);
m_AccountManagerProcessingPage = new CAccountManagerProcessingPage;
m_AccountManagerProcessingPage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_AccountManagerProcessingPage);
m_AccountInfoPage = new CAccountInfoPage; m_AccountInfoPage = new CAccountInfoPage;
m_AccountInfoPage->Create( itemWizard1 ); m_AccountInfoPage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_AccountInfoPage); GetPageAreaSizer()->Add(m_AccountInfoPage);
m_AccountManagerProcessingPage = new CAccountManagerProcessingPage; m_TermsOfUsePage = new CTermsOfUsePage;
m_AccountManagerProcessingPage->Create( itemWizard1 ); m_TermsOfUsePage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_AccountManagerProcessingPage); GetPageAreaSizer()->Add(m_TermsOfUsePage);
m_CompletionPage = new CCompletionPage; m_CompletionPage = new CCompletionPage;
m_CompletionPage->Create( itemWizard1 ); 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_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_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_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_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_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_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); 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) if (ID_ACCOUNTMANAGERPROPERTIESPAGE == ulPageID)
pPage = m_AccountManagerPropertiesPage; pPage = m_AccountManagerPropertiesPage;
if (ID_ACCOUNTINFOPAGE == ulPageID)
pPage = m_AccountInfoPage;
if (ID_ACCOUNTMANAGERPROCESSINGPAGE == ulPageID) if (ID_ACCOUNTMANAGERPROCESSINGPAGE == ulPageID)
pPage = m_AccountManagerProcessingPage; pPage = m_AccountManagerProcessingPage;
if (ID_TERMSOFUSEPAGE == ulPageID)
pPage = m_TermsOfUsePage;
if (ID_ACCOUNTINFOPAGE == ulPageID)
pPage = m_AccountInfoPage;
if (ID_COMPLETIONPAGE == ulPageID) if (ID_COMPLETIONPAGE == ulPageID)
pPage = m_CompletionPage; pPage = m_CompletionPage;

View File

@ -107,6 +107,7 @@ public:
CAccountManagerInfoPage* m_AccountManagerInfoPage; CAccountManagerInfoPage* m_AccountManagerInfoPage;
CAccountManagerPropertiesPage* m_AccountManagerPropertiesPage; CAccountManagerPropertiesPage* m_AccountManagerPropertiesPage;
CAccountManagerProcessingPage* m_AccountManagerProcessingPage; CAccountManagerProcessingPage* m_AccountManagerProcessingPage;
CTermsOfUsePage* m_TermsOfUsePage;
CAccountInfoPage* m_AccountInfoPage; CAccountInfoPage* m_AccountInfoPage;
CCompletionPage* m_CompletionPage; CCompletionPage* m_CompletionPage;
CCompletionErrorPage* m_CompletionErrorPage; CCompletionErrorPage* m_CompletionErrorPage;

View File

@ -40,9 +40,9 @@
#include "WelcomePage.h" #include "WelcomePage.h"
#include "ProjectInfoPage.h" #include "ProjectInfoPage.h"
#include "ProjectPropertiesPage.h" #include "ProjectPropertiesPage.h"
#include "AccountInfoPage.h"
#include "AccountKeyPage.h"
#include "ProjectProcessingPage.h" #include "ProjectProcessingPage.h"
#include "TermsOfUsePage.h"
#include "AccountInfoPage.h"
#include "CompletionPage.h" #include "CompletionPage.h"
#include "CompletionErrorPage.h" #include "CompletionErrorPage.h"
#include "NotDetectedPage.h" #include "NotDetectedPage.h"
@ -102,9 +102,9 @@ bool CWizardAttachProject::Create( wxWindow* parent, wxWindowID id, const wxPoin
m_WelcomePage = NULL; m_WelcomePage = NULL;
m_ProjectInfoPage = NULL; m_ProjectInfoPage = NULL;
m_ProjectPropertiesPage = NULL; m_ProjectPropertiesPage = NULL;
m_AccountKeyPage = NULL;
m_AccountInfoPage = NULL;
m_ProjectProcessingPage = NULL; m_ProjectProcessingPage = NULL;
m_TermsOfUsePage = NULL;
m_AccountInfoPage = NULL;
m_CompletionPage = NULL; m_CompletionPage = NULL;
m_CompletionErrorPage = NULL; m_CompletionErrorPage = NULL;
m_ErrNotDetectedPage = NULL; m_ErrNotDetectedPage = NULL;
@ -191,17 +191,17 @@ void CWizardAttachProject::CreateControls()
m_ProjectPropertiesPage->Create( itemWizard1 ); m_ProjectPropertiesPage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_ProjectPropertiesPage); GetPageAreaSizer()->Add(m_ProjectPropertiesPage);
m_AccountKeyPage = new CAccountKeyPage; m_ProjectProcessingPage = new CProjectProcessingPage;
m_AccountKeyPage->Create( itemWizard1 ); m_ProjectProcessingPage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_AccountKeyPage); GetPageAreaSizer()->Add(m_ProjectProcessingPage);
m_AccountInfoPage = new CAccountInfoPage; m_AccountInfoPage = new CAccountInfoPage;
m_AccountInfoPage->Create( itemWizard1 ); m_AccountInfoPage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_AccountInfoPage); GetPageAreaSizer()->Add(m_AccountInfoPage);
m_ProjectProcessingPage = new CProjectProcessingPage; m_TermsOfUsePage = new CTermsOfUsePage;
m_ProjectProcessingPage->Create( itemWizard1 ); m_TermsOfUsePage->Create( itemWizard1 );
GetPageAreaSizer()->Add(m_ProjectProcessingPage); GetPageAreaSizer()->Add(m_TermsOfUsePage);
m_CompletionPage = new CCompletionPage; m_CompletionPage = new CCompletionPage;
m_CompletionPage->Create( itemWizard1 ); m_CompletionPage->Create( itemWizard1 );
@ -244,14 +244,13 @@ void CWizardAttachProject::CreateControls()
GetPageAreaSizer()->Add(m_ErrProxyPage); GetPageAreaSizer()->Add(m_ErrProxyPage);
////@end CWizardAttachProject content construction ////@end CWizardAttachProject content construction
wxLogTrace(wxT("Function Status"), wxT("CWizardAttachProject::CreateControls - Begin Page Map")); 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_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_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_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_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_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_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); 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)) { if (detect_setup_authenticator(url, authenticator)) {
m_bCredentialsDetected = true; m_bCredentialsDetected = true;
close_when_completed = 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) if (ID_PROJECTPROPERTIESPAGE == ulPageID)
pPage = m_ProjectPropertiesPage; pPage = m_ProjectPropertiesPage;
if (ID_ACCOUNTINFOPAGE == ulPageID)
pPage = m_AccountInfoPage;
if (ID_ACCOUNTKEYPAGE == ulPageID)
pPage = m_AccountKeyPage;
if (ID_PROJECTPROCESSINGPAGE == ulPageID) if (ID_PROJECTPROCESSINGPAGE == ulPageID)
pPage = m_ProjectProcessingPage; pPage = m_ProjectProcessingPage;
if (ID_TERMSOFUSEPAGE == ulPageID)
pPage = m_TermsOfUsePage;
if (ID_ACCOUNTINFOPAGE == ulPageID)
pPage = m_AccountInfoPage;
if (ID_COMPLETIONPAGE == ulPageID) if (ID_COMPLETIONPAGE == ulPageID)
pPage = m_CompletionPage; pPage = m_CompletionPage;
@ -477,8 +476,6 @@ void CWizardAttachProject::_ProcessCancelEvent( wxWizardExEvent& event ) {
if (wxYES == iRetVal) { if (wxYES == iRetVal) {
if (page == m_ProjectInfoPage) { if (page == m_ProjectInfoPage) {
m_ProjectInfoPage->m_pProjectUrlCtrl->SetValidator(wxDefaultValidator); m_ProjectInfoPage->m_pProjectUrlCtrl->SetValidator(wxDefaultValidator);
} else if (page == m_AccountKeyPage) {
m_AccountKeyPage->m_pAccountKeyCtrl->SetValidator(wxDefaultValidator);
} else if (page == m_AccountInfoPage) { } else if (page == m_AccountInfoPage) {
m_AccountInfoPage->m_pAccountEmailAddressCtrl->SetValidator(wxDefaultValidator); m_AccountInfoPage->m_pAccountEmailAddressCtrl->SetValidator(wxDefaultValidator);
m_AccountInfoPage->m_pAccountPasswordCtrl->SetValidator(wxDefaultValidator); m_AccountInfoPage->m_pAccountPasswordCtrl->SetValidator(wxDefaultValidator);

View File

@ -108,9 +108,9 @@ public:
CWelcomePage* m_WelcomePage; CWelcomePage* m_WelcomePage;
CProjectInfoPage* m_ProjectInfoPage; CProjectInfoPage* m_ProjectInfoPage;
CProjectPropertiesPage* m_ProjectPropertiesPage; CProjectPropertiesPage* m_ProjectPropertiesPage;
CAccountKeyPage* m_AccountKeyPage;
CAccountInfoPage* m_AccountInfoPage;
CProjectProcessingPage* m_ProjectProcessingPage; CProjectProcessingPage* m_ProjectProcessingPage;
CTermsOfUsePage* m_TermsOfUsePage;
CAccountInfoPage* m_AccountInfoPage;
CCompletionPage* m_CompletionPage; CCompletionPage* m_CompletionPage;
CCompletionErrorPage* m_CompletionErrorPage; CCompletionErrorPage* m_CompletionErrorPage;
CErrNotDetectedPage* m_ErrNotDetectedPage; CErrNotDetectedPage* m_ErrNotDetectedPage;
@ -124,7 +124,7 @@ public:
////@end CWizardAttachProject member variables ////@end CWizardAttachProject member variables
bool m_bCredentialsCached; bool m_bCredentialsCached;
bool m_bCredentialsDetected; bool m_bCredentialsDetected;
wxString strProjectName; wxString m_strProjectName;
}; };
#endif // _WIZ_ATTACHPROJECT_H_ #endif // _WIZ_ATTACHPROJECT_H_

View File

@ -3060,14 +3060,6 @@
RelativePath="..\clientgui\AccountInfoPage.h" RelativePath="..\clientgui\AccountInfoPage.h"
> >
</File> </File>
<File
RelativePath="..\clientgui\AccountKeyPage.cpp"
>
</File>
<File
RelativePath="..\clientgui\AccountKeyPage.h"
>
</File>
<File <File
RelativePath="..\clientgui\AccountManagerInfoPage.cpp" RelativePath="..\clientgui\AccountManagerInfoPage.cpp"
> >
@ -3188,6 +3180,14 @@
RelativePath="..\clientgui\ProxyPage.h" RelativePath="..\clientgui\ProxyPage.h"
> >
</File> </File>
<File
RelativePath="..\clientgui\TermsOfUsePage .cpp"
>
</File>
<File
RelativePath="..\clientgui\TermsOfUsePage.h"
>
</File>
<File <File
RelativePath="..\clientgui\UnavailablePage.cpp" RelativePath="..\clientgui\UnavailablePage.cpp"
> >