mirror of https://github.com/BOINC/boinc.git
- MGR: Remove UserDisagreesPage from the wizard, replace functionality
by enabling/disabling the next button as needed. - MGR: Fix a couple of warnings. clientgui/ sg_CustomControls.cpp sg_DlgMessages.cpp TermsOfUsePage.cpp UserDisagreesPage.cpp, .h (Deleted) WizardAttach.cpp, .h svn path=/trunk/boinc/; revision=23293
This commit is contained in:
parent
44dc2df81d
commit
f696d90893
|
@ -1930,3 +1930,15 @@ Rom 29 Mar 2011
|
|||
|
||||
client/
|
||||
coproc_detect.cpp
|
||||
|
||||
Rom 29 Mar 2011
|
||||
- MGR: Remove UserDisagreesPage from the wizard, replace functionality
|
||||
by enabling/disabling the next button as needed.
|
||||
- MGR: Fix a couple of warnings.
|
||||
|
||||
clientgui/
|
||||
sg_CustomControls.cpp
|
||||
sg_DlgMessages.cpp
|
||||
TermsOfUsePage.cpp
|
||||
UserDisagreesPage.cpp, .h (Deleted)
|
||||
WizardAttach.cpp, .h
|
||||
|
|
|
@ -162,7 +162,7 @@ wxWizardPageEx* CTermsOfUsePage::GetNext() const
|
|||
} else if (GetUserAgrees()) {
|
||||
return PAGE_TRANSITION_NEXT(ID_ACCOUNTINFOPAGE);
|
||||
} else {
|
||||
return PAGE_TRANSITION_NEXT(ID_ERRUSERDISAGREESPAGE);
|
||||
return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -237,7 +237,10 @@ void CTermsOfUsePage::OnPageChanged( wxWizardExEvent& event ) {
|
|||
_("I do not agree with the terms of use.")
|
||||
);
|
||||
m_pDisagreeCtrl->SetValue(true);
|
||||
|
||||
SetUserAgrees(false);
|
||||
((CWizardAttach*)GetParent())->DisableNextButton();
|
||||
|
||||
|
||||
Fit();
|
||||
}
|
||||
|
@ -288,9 +291,11 @@ void CTermsOfUsePage::OnTermsOfUseStatusChange( wxCommandEvent& event ) {
|
|||
if ((ID_TERMSOFUSEAGREECTRL == event.GetId()) && event.IsChecked()){
|
||||
wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - SetUserAgrees(true)"));
|
||||
SetUserAgrees(true);
|
||||
((CWizardAttach*)GetParent())->EnableNextButton();
|
||||
} else {
|
||||
wxLogTrace(wxT("Function Status"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - SetUserAgrees(false)"));
|
||||
SetUserAgrees(false);
|
||||
((CWizardAttach*)GetParent())->DisableNextButton();
|
||||
}
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CTermsOfUsePage::OnTermsOfUseStatusChange - Function End"));
|
||||
|
|
|
@ -1,207 +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 "UserDisagreesPage.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 "BOINCBaseWizard.h"
|
||||
#include "WizardAttach.h"
|
||||
#include "UserDisagreesPage.h"
|
||||
|
||||
|
||||
/*!
|
||||
* CErrUserDisagreesPage type definition
|
||||
*/
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS( CErrUserDisagreesPage, wxWizardPageEx )
|
||||
|
||||
/*!
|
||||
* CErrUserDisagreesPage event table definition
|
||||
*/
|
||||
|
||||
BEGIN_EVENT_TABLE( CErrUserDisagreesPage, wxWizardPageEx )
|
||||
|
||||
////@begin CErrUserDisagreesPage event table entries
|
||||
EVT_WIZARDEX_PAGE_CHANGED( -1, CErrUserDisagreesPage::OnPageChanged )
|
||||
EVT_WIZARDEX_CANCEL( -1, CErrUserDisagreesPage::OnCancel )
|
||||
|
||||
////@end CErrUserDisagreesPage event table entries
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
/*!
|
||||
* CErrUserDisagreesPage constructors
|
||||
*/
|
||||
|
||||
CErrUserDisagreesPage::CErrUserDisagreesPage( )
|
||||
{
|
||||
}
|
||||
|
||||
CErrUserDisagreesPage::CErrUserDisagreesPage( CBOINCBaseWizard* parent )
|
||||
{
|
||||
Create( parent );
|
||||
}
|
||||
|
||||
/*!
|
||||
* CErrUserDisagreesPage creator
|
||||
*/
|
||||
|
||||
bool CErrUserDisagreesPage::Create( CBOINCBaseWizard* parent )
|
||||
{
|
||||
////@begin CErrUserDisagreesPage member initialisation
|
||||
m_pTitleStaticCtrl = NULL;
|
||||
m_pDirectionsStaticCtrl = NULL;
|
||||
////@end CErrUserDisagreesPage member initialisation
|
||||
|
||||
////@begin CErrUserDisagreesPage creation
|
||||
wxWizardPageEx::Create( parent, ID_ERRUSERDISAGREESPAGE );
|
||||
|
||||
CreateControls();
|
||||
GetSizer()->Fit(this);
|
||||
////@end CErrUserDisagreesPage creation
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Control creation for CErrUserDisagreesPage
|
||||
*/
|
||||
|
||||
void CErrUserDisagreesPage::CreateControls()
|
||||
{
|
||||
////@begin CErrUserDisagreesPage content construction
|
||||
CErrUserDisagreesPage* 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);
|
||||
////@end CErrUserDisagreesPage content construction
|
||||
}
|
||||
|
||||
/*!
|
||||
* Gets the previous page.
|
||||
*/
|
||||
|
||||
wxWizardPageEx* CErrUserDisagreesPage::GetPrev() const
|
||||
{
|
||||
return PAGE_TRANSITION_BACK;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Gets the next page.
|
||||
*/
|
||||
|
||||
wxWizardPageEx* CErrUserDisagreesPage::GetNext() const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Should we show tooltips?
|
||||
*/
|
||||
|
||||
bool CErrUserDisagreesPage::ShowToolTips()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get bitmap resources
|
||||
*/
|
||||
|
||||
wxBitmap CErrUserDisagreesPage::GetBitmapResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Bitmap retrieval
|
||||
|
||||
////@begin CErrUserDisagreesPage bitmap retrieval
|
||||
return wxNullBitmap;
|
||||
////@end CErrUserDisagreesPage bitmap retrieval
|
||||
}
|
||||
|
||||
/*!
|
||||
* Get icon resources
|
||||
*/
|
||||
|
||||
wxIcon CErrUserDisagreesPage::GetIconResource( const wxString& WXUNUSED(name) )
|
||||
{
|
||||
// Icon retrieval
|
||||
|
||||
////@begin CErrUserDisagreesPage icon retrieval
|
||||
return wxNullIcon;
|
||||
////@end CErrUserDisagreesPage icon retrieval
|
||||
}
|
||||
|
||||
/*!
|
||||
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRUSERDISAGREESPAGE
|
||||
*/
|
||||
|
||||
void CErrUserDisagreesPage::OnPageChanged( wxWizardExEvent& event ) {
|
||||
if (event.GetDirection() == false) return;
|
||||
|
||||
wxASSERT(m_pTitleStaticCtrl);
|
||||
wxASSERT(m_pDirectionsStaticCtrl);
|
||||
|
||||
if (IS_ATTACHTOPROJECTWIZARD()) {
|
||||
m_pTitleStaticCtrl->SetLabel(
|
||||
_("Failed to add project")
|
||||
);
|
||||
} else if (IS_ACCOUNTMANAGERWIZARD()) {
|
||||
m_pTitleStaticCtrl->SetLabel(
|
||||
_("Failed to add account manager")
|
||||
);
|
||||
} else {
|
||||
wxASSERT(FALSE);
|
||||
}
|
||||
|
||||
m_pDirectionsStaticCtrl->SetLabel(
|
||||
_("You did not agree to the terms of use.\nClick Finish or Cancel to close.")
|
||||
);
|
||||
|
||||
Fit();
|
||||
}
|
||||
|
||||
/*!
|
||||
* wxEVT_WIZARD_CANCEL event handler for ID_ERRUSERDISAGREESPAGE
|
||||
*/
|
||||
|
||||
void CErrUserDisagreesPage::OnCancel( wxWizardExEvent& event ) {
|
||||
PROCESS_CANCELEVENT(event);
|
||||
}
|
||||
|
|
@ -1,81 +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/>.
|
||||
//
|
||||
#ifndef _WIZ_USERDISAGREESPAGE_H_
|
||||
#define _WIZ_USERDISAGREESPAGE_H_
|
||||
|
||||
#if defined(__GNUG__) && !defined(__APPLE__)
|
||||
#pragma interface "UserDisagreesPage.cpp"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* CErrUserDisagreesPage class declaration
|
||||
*/
|
||||
|
||||
class CErrUserDisagreesPage: public wxWizardPageEx
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS( CErrUserDisagreesPage )
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
public:
|
||||
/// Constructors
|
||||
CErrUserDisagreesPage( );
|
||||
|
||||
CErrUserDisagreesPage( CBOINCBaseWizard* parent );
|
||||
|
||||
/// Creation
|
||||
bool Create( CBOINCBaseWizard* parent );
|
||||
|
||||
/// Creates the controls and sizers
|
||||
void CreateControls();
|
||||
|
||||
////@begin CErrUserDisagreesPage event handler declarations
|
||||
|
||||
/// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ERRPROJECTUSERDISAGREES
|
||||
void OnPageChanged( wxWizardExEvent& event );
|
||||
|
||||
/// wxEVT_WIZARD_CANCEL event handler for ID_ERRPROJECTUSERDISAGREES
|
||||
void OnCancel( wxWizardExEvent& event );
|
||||
|
||||
////@end CErrUserDisagreesPage event handler declarations
|
||||
|
||||
////@begin CErrUserDisagreesPage 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 CErrUserDisagreesPage member function declarations
|
||||
|
||||
/// Should we show tooltips?
|
||||
static bool ShowToolTips();
|
||||
|
||||
////@begin CErrUserDisagreesPage member variables
|
||||
wxStaticText* m_pTitleStaticCtrl;
|
||||
wxStaticText* m_pDirectionsStaticCtrl;
|
||||
////@end CErrUserDisagreesPage member variables
|
||||
};
|
||||
|
||||
#endif
|
||||
// _WIZ_USERDISAGREESPAGE_H_
|
|
@ -54,7 +54,6 @@
|
|||
#include "AlreadyExistsPage.h"
|
||||
#include "ProxyInfoPage.h"
|
||||
#include "ProxyPage.h"
|
||||
#include "UserDisagreesPage.h"
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -249,11 +248,6 @@ void CWizardAttach::CreateControls()
|
|||
m_ErrProxyPage->Create( itemWizard1 );
|
||||
GetPageAreaSizer()->Add(m_ErrProxyPage);
|
||||
|
||||
m_ErrUserDisagreesPage = new CErrUserDisagreesPage;
|
||||
m_ErrUserDisagreesPage->Create( itemWizard1 );
|
||||
GetPageAreaSizer()->Add(m_ErrUserDisagreesPage);
|
||||
|
||||
|
||||
////@end CWizardAttach content construction
|
||||
|
||||
wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::CreateControls - Begin Page Map"));
|
||||
|
@ -348,11 +342,6 @@ void CWizardAttach::CreateControls()
|
|||
wxT("CWizardAttach::CreateControls - m_ErrProxyPage = id: '%d', location: '%p', height: '%d', width: '%d'"),
|
||||
m_ErrProxyPage->GetId(), m_ErrProxyPage, m_ErrProxyPage->GetBestSize().GetHeight(), m_ErrProxyPage->GetBestSize().GetWidth()
|
||||
);
|
||||
wxLogTrace(
|
||||
wxT("Function Status"),
|
||||
wxT("CWizardAttach::CreateControls - m_ErrUserDisagreesPage = id: '%d', location: '%p', height: '%d', width: '%d'"),
|
||||
m_ErrUserDisagreesPage->GetId(), m_ErrUserDisagreesPage, m_ErrUserDisagreesPage->GetBestSize().GetHeight(), m_ErrUserDisagreesPage->GetBestSize().GetWidth()
|
||||
);
|
||||
|
||||
wxLogTrace(wxT("Function Status"), wxT("CWizardAttach::CreateControls - End Page Map"));
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CWizardAttach::CreateControls - Function End"));
|
||||
|
@ -500,7 +489,6 @@ bool CWizardAttach::HasNextPage( wxWizardPageEx* page )
|
|||
bNoNextPageDetected |= (page == m_ErrUnavailablePage);
|
||||
bNoNextPageDetected |= (page == m_ErrNoInternetConnectionPage);
|
||||
bNoNextPageDetected |= (page == m_ErrAlreadyExistsPage);
|
||||
bNoNextPageDetected |= (page == m_ErrUserDisagreesPage);
|
||||
|
||||
if (bNoNextPageDetected)
|
||||
return false;
|
||||
|
@ -603,9 +591,6 @@ wxWizardPageEx* CWizardAttach::_PushPageTransition( wxWizardPageEx* pCurrentPage
|
|||
if (ID_ERRPROXYPAGE == ulPageID)
|
||||
pPage = m_ErrProxyPage;
|
||||
|
||||
if (ID_ERRUSERDISAGREESPAGE == ulPageID)
|
||||
pPage = m_ErrUserDisagreesPage;
|
||||
|
||||
if (pPage) {
|
||||
if (m_PageTransition.size() == 0) {
|
||||
m_PageTransition.push(NULL);
|
||||
|
@ -661,7 +646,6 @@ void CWizardAttach::_ProcessCancelEvent( wxWizardExEvent& event ) {
|
|||
bCancelWithoutNextPage |= (page == m_ErrNotDetectedPage);
|
||||
bCancelWithoutNextPage |= (page == m_ErrUnavailablePage);
|
||||
bCancelWithoutNextPage |= (page == m_ErrNoInternetConnectionPage);
|
||||
bCancelWithoutNextPage |= (page == m_ErrUserDisagreesPage);
|
||||
|
||||
if (IsAttachToProjectWizard) {
|
||||
bCancelWithoutNextPage |= (page == m_ErrAlreadyExistsPage);
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#define ID_ERRPROXYINFOPAGE 10111
|
||||
#define ID_ERRPROXYPAGE 10112
|
||||
#define ID_TERMSOFUSEPAGE 10113
|
||||
#define ID_ERRUSERDISAGREESPAGE 10114
|
||||
|
||||
// Attach to Project Wizard Pages
|
||||
#define ID_PROJECTINFOPAGE 10200
|
||||
|
|
|
@ -68,7 +68,7 @@ END_EVENT_TABLE()
|
|||
|
||||
CTransparentStaticText::CTransparentStaticText() {}
|
||||
|
||||
CTransparentStaticText::CTransparentStaticText(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) {
|
||||
CTransparentStaticText::CTransparentStaticText(wxWindow* parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, const wxString& WXUNUSED(name) ) {
|
||||
// Set name same as label for accessibility on Windows
|
||||
Create(parent, id, label, pos, size, style, label);
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ void CPanelMessages::OnOK( wxCommandEvent& event ) {
|
|||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP
|
||||
*/
|
||||
|
||||
void CPanelMessages::OnButtonHelp( wxCommandEvent& event ) {
|
||||
void CPanelMessages::OnButtonHelp( wxCommandEvent& WXUNUSED(event) ) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CPanelMessages::OnHelp - Function Begin"));
|
||||
|
||||
if (IsShown()) {
|
||||
|
@ -431,7 +431,7 @@ void CDlgMessages::OnShow(wxShowEvent& event) {
|
|||
* wxEVT_HELP event handler for ID_DLGMESSAGES
|
||||
*/
|
||||
|
||||
void CDlgMessages::OnHelp(wxHelpEvent& event) {
|
||||
void CDlgMessages::OnHelp(wxHelpEvent& WXUNUSED(event)) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CDlgMessages::OnHelp - Function Begin"));
|
||||
|
||||
if (IsShown()) {
|
||||
|
|
|
@ -1181,14 +1181,6 @@
|
|||
RelativePath="..\clientgui\UnavailablePage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientgui\UserDisagreesPage.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientgui\UserDisagreesPage.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\clientgui\WelcomePage.cpp"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue