/*! * Runs the wizard. */ bool CWizardAttach::Run( wxString strProjectURL, bool bCredentialsCached ) { if (strProjectURL.Length()) { SetProjectURL(strProjectURL); SetCredentialsCached(bCredentialsCached); } // If credentials are not cached, then we should try one last place to look up the // authenticator. Some projects will set a "Setup" cookie off of their URL with a // pretty short timeout. Lets take a crack at detecting it. // if (!strProjectURL.IsEmpty() && !bCredentialsCached) { std::string url = std::string(strProjectURL.mb_str()); std::string authenticator; if (detect_setup_authenticator(url, authenticator)) { SetCredentialsDetected(true); SetCloseWhenCompleted(true); SetProjectAuthenticator(wxString(authenticator.c_str(), wxConvUTF8)); } } if (m_ProjectPropertiesPage || m_ProjectInfoPage) { IsAttachToProjectWizard = true; IsAccountManagerWizard = false; if (strProjectURL.Length()) { return RunWizard(m_ProjectPropertiesPage); } else { return RunWizard(m_ProjectInfoPage); } } return FALSE; }
/*! * Runs the wizard. */ bool CWizardAttach::Run( wxString& WXUNUSED(strName), wxString& strURL, wxString& strTeamName, bool bCredentialsCached ) { m_strTeamName = strTeamName; if (strURL.Length()) { m_ProjectInfoPage->SetProjectURL( strURL ); m_bCredentialsCached = bCredentialsCached; } // If credentials are not cached, then we should try one last place to look up the // authenticator. Some projects will set a "Setup" cookie off of their URL with a // pretty short timeout. Lets take a crack at detecting it. // if (!strURL.IsEmpty() && !bCredentialsCached) { std::string url = std::string(strURL.mb_str()); std::string authenticator; if (detect_setup_authenticator(url, authenticator)) { m_bCredentialsDetected = true; close_when_completed = true; SetProjectAuthenticator(wxString(authenticator.c_str(), wxConvUTF8)); } } if (strURL.Length() && m_ProjectPropertiesPage) { return RunWizard(m_ProjectPropertiesPage); } else if (m_WelcomePage) { return RunWizard(m_WelcomePage); } return FALSE; }