From 75f463aa2a1a834eff0039e964d51406b59269ec Mon Sep 17 00:00:00 2001 From: davidpanderson Date: Sat, 1 Aug 2020 21:23:49 -0700 Subject: [PATCH] Manager: clean up "Welcome page" --- clientgui/AccountInfoPage.cpp | 5 +++- clientgui/ProjectWelcomePage.cpp | 50 ++++---------------------------- clientgui/WizardAttach.cpp | 2 +- 3 files changed, 11 insertions(+), 46 deletions(-) diff --git a/clientgui/AccountInfoPage.cpp b/clientgui/AccountInfoPage.cpp index 76f40fee38..6e79d1fcb9 100644 --- a/clientgui/AccountInfoPage.cpp +++ b/clientgui/AccountInfoPage.cpp @@ -323,7 +323,10 @@ void CAccountInfoPage::OnPageChanged( wxWizardExEvent& /* event */ ) { wxString str; wxString name = wxString(pc.name.c_str(), wxConvUTF8); - str.Printf(_("Identify your account at %s"), name.c_str()); + str.Printf(_("Identify your account at %s"), + name.empty()? pWA->GetProjectName().c_str() : name.c_str() + // one or the other is populated depending on how project was selected + ); m_pTitleStaticCtrl->SetLabel(str); if (!IS_ACCOUNTMANAGERWIZARD() && !IS_ACCOUNTMANAGERUPDATEWIZARD()) { diff --git a/clientgui/ProjectWelcomePage.cpp b/clientgui/ProjectWelcomePage.cpp index 32ce29a85c..92e167a511 100644 --- a/clientgui/ProjectWelcomePage.cpp +++ b/clientgui/ProjectWelcomePage.cpp @@ -15,6 +15,12 @@ // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . // + +// show a "welcome" dialog showing the user what project they're about to run, +// in the case where a project_init.xml was present on startup +// +// AFAIK no one uses this mechanism, so this may not be needed + #if defined(__GNUG__) && !defined(__APPLE__) #pragma implementation "ProjectWelcomePage.h" #endif @@ -129,22 +135,6 @@ void CProjectWelcomePage::CreateControls() project_name2_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); grid->Add(project_name2_ctrl, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5); - project_inst1_ctrl = new wxStaticText; - project_inst1_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - grid->Add(project_inst1_ctrl, 0, wxALIGN_LEFT|wxALL, 5); - - project_inst2_ctrl = new wxStaticText; - project_inst2_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - grid->Add(project_inst2_ctrl, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5); - - project_desc1_ctrl = new wxStaticText; - project_desc1_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - grid->Add(project_desc1_ctrl, 0, wxALIGN_LEFT|wxALL, 5); - - project_desc2_ctrl = new wxStaticText; - project_desc2_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - grid->Add(project_desc2_ctrl, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5); - project_url1_ctrl = new wxStaticText; project_url1_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); grid->Add(project_url1_ctrl, 0, wxALIGN_LEFT|wxALL, 5); @@ -153,18 +143,6 @@ void CProjectWelcomePage::CreateControls() project_url2_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); grid->Add(project_url2_ctrl, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5); - user_name1_ctrl = new wxStaticText; - user_name1_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - grid->Add(user_name1_ctrl, 0, wxALIGN_LEFT|wxALL, 5); - - user_name2_ctrl = new wxStaticText; - user_name2_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - grid->Add(user_name2_ctrl, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5); - - warning_ctrl = new wxStaticText; - warning_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - itemBoxSizer3->Add(warning_ctrl, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5); - continue_ctrl = new wxStaticText; continue_ctrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); itemBoxSizer3->Add(continue_ctrl, 0, wxALIGN_LEFT|wxALL, 5); @@ -253,25 +231,9 @@ void CProjectWelcomePage::OnPageChanged( wxWizardExEvent& event ) { intro_ctrl->SetLabel(_("You have volunteered to compute for this project:")); project_name1_ctrl->SetLabel(_("Name:")); project_name2_ctrl->SetLabel(pWA->GetProjectName()); - if (!pWA->GetProjectInstitution().IsEmpty()) { - project_inst1_ctrl->SetLabel(_("Home:")); - project_inst2_ctrl->SetLabel(pWA->GetProjectInstitution()); - } - if (!pWA->GetProjectDescription().IsEmpty()) { - project_desc1_ctrl->SetLabel(_("Description:")); - project_desc2_ctrl->SetLabel(pWA->GetProjectDescription()); - } project_url1_ctrl->SetLabel(_("URL:")); project_url2_ctrl->SetLabel(pWA->GetProjectURL()); - if (!pWA->GetProjectUserName().IsEmpty()) { - user_name1_ctrl->SetLabel(_("User:")); - user_name2_ctrl->SetLabel(pWA->GetProjectUserName()); - } - if (!pWA->IsProjectKnown()) { - warning_ctrl->SetLabel(_("WARNING: This project is not registered with BOINC. Make sure you trust it before continuing.")); - - } continue_ctrl->SetLabel( _("To continue, click Next.") ); diff --git a/clientgui/WizardAttach.cpp b/clientgui/WizardAttach.cpp index f8b8de0211..01c33ef3e6 100644 --- a/clientgui/WizardAttach.cpp +++ b/clientgui/WizardAttach.cpp @@ -285,7 +285,7 @@ bool CWizardAttach::Run( if (m_ProjectPropertiesPage && m_ProjectInfoPage && m_ProjectWelcomePage) { IsAttachToProjectWizard = true; IsAccountManagerWizard = false; - if ((strProjectName.size() && strProjectURL.size()) || !bEmbedded) { + if ((strProjectName.size() && strProjectURL.size())) { return RunWizard(m_ProjectWelcomePage); } else if (strProjectURL.size() && (IsCredentialsCached() || IsCredentialsDetected())) { return RunWizard(m_ProjectPropertiesPage);