mirror of https://github.com/BOINC/boinc.git
MGR: In the simple attach scenario, only launch the attach wizard if we are not already attached to the project.
This commit is contained in:
parent
6bc87783dc
commit
a88c671310
|
@ -1783,29 +1783,31 @@ void CAdvancedFrame::OnConnect(CFrameEvent& WXUNUSED(event)) {
|
|||
strProjectName, strProjectURL, strProjectAuthenticator, strProjectInstitution, strProjectDescription, strProjectKnown
|
||||
)
|
||||
){
|
||||
wasShown = IsShown();
|
||||
Show();
|
||||
wasVisible = wxGetApp().IsApplicationVisible();
|
||||
if (!wasVisible) {
|
||||
wxGetApp().ShowApplication(true);
|
||||
}
|
||||
if (!pDoc->project((char*)strProjectURL.c_str())) {
|
||||
wasShown = IsShown();
|
||||
Show();
|
||||
wasVisible = wxGetApp().IsApplicationVisible();
|
||||
if (!wasVisible) {
|
||||
wxGetApp().ShowApplication(true);
|
||||
}
|
||||
|
||||
pWizard = new CWizardAttach(this);
|
||||
pWizard = new CWizardAttach(this);
|
||||
|
||||
if (pWizard->RunSimpleProjectAttach(
|
||||
wxURI::Unescape(strProjectName),
|
||||
wxURI::Unescape(strProjectURL),
|
||||
wxURI::Unescape(strProjectAuthenticator),
|
||||
wxURI::Unescape(strProjectInstitution),
|
||||
wxURI::Unescape(strProjectDescription),
|
||||
wxURI::Unescape(strProjectKnown)
|
||||
)
|
||||
) {
|
||||
// If successful, display the projects tab
|
||||
m_pNotebook->SetSelection(ID_ADVTASKSVIEW - ID_ADVVIEWBASE);
|
||||
} else {
|
||||
// If failure, display the notices tab
|
||||
m_pNotebook->SetSelection(ID_ADVNOTICESVIEW - ID_ADVVIEWBASE);
|
||||
if (pWizard->RunSimpleProjectAttach(
|
||||
wxURI::Unescape(strProjectName),
|
||||
wxURI::Unescape(strProjectURL),
|
||||
wxURI::Unescape(strProjectAuthenticator),
|
||||
wxURI::Unescape(strProjectInstitution),
|
||||
wxURI::Unescape(strProjectDescription),
|
||||
wxURI::Unescape(strProjectKnown)
|
||||
)
|
||||
) {
|
||||
// If successful, display the projects tab
|
||||
m_pNotebook->SetSelection(ID_ADVTASKSVIEW - ID_ADVVIEWBASE);
|
||||
} else {
|
||||
// If failure, display the notices tab
|
||||
m_pNotebook->SetSelection(ID_ADVNOTICESVIEW - ID_ADVVIEWBASE);
|
||||
}
|
||||
}
|
||||
} else if (ami.acct_mgr_url.size() && ami.have_credentials) {
|
||||
// Fall through
|
||||
|
|
|
@ -224,7 +224,7 @@ private:
|
|||
public:
|
||||
int CachedProjectStatusUpdate(bool bForce = false);
|
||||
PROJECT* project(unsigned int);
|
||||
PROJECT* project(char* url);
|
||||
PROJECT* project(char* url);
|
||||
float m_fProjectTotalResourceShare;
|
||||
|
||||
int GetProjectCount();
|
||||
|
|
|
@ -714,23 +714,25 @@ void CSimpleFrame::OnConnect(CFrameEvent& WXUNUSED(event)) {
|
|||
strProjectName, strProjectURL, strProjectAuthenticator, strProjectInstitution, strProjectDescription, strProjectKnown
|
||||
)
|
||||
){
|
||||
wasShown = IsShown();
|
||||
Show();
|
||||
wasVisible = wxGetApp().IsApplicationVisible();
|
||||
if (!wasVisible) {
|
||||
wxGetApp().ShowApplication(true);
|
||||
}
|
||||
if (!pDoc->project((char*)strProjectURL.c_str())) {
|
||||
wasShown = IsShown();
|
||||
Show();
|
||||
wasVisible = wxGetApp().IsApplicationVisible();
|
||||
if (!wasVisible) {
|
||||
wxGetApp().ShowApplication(true);
|
||||
}
|
||||
|
||||
pWizard = new CWizardAttach(this);
|
||||
pWizard = new CWizardAttach(this);
|
||||
|
||||
pWizard->RunSimpleProjectAttach(
|
||||
wxURI::Unescape(strProjectName),
|
||||
wxURI::Unescape(strProjectURL),
|
||||
wxURI::Unescape(strProjectAuthenticator),
|
||||
wxURI::Unescape(strProjectInstitution),
|
||||
wxURI::Unescape(strProjectDescription),
|
||||
wxURI::Unescape(strProjectKnown)
|
||||
);
|
||||
pWizard->RunSimpleProjectAttach(
|
||||
wxURI::Unescape(strProjectName),
|
||||
wxURI::Unescape(strProjectURL),
|
||||
wxURI::Unescape(strProjectAuthenticator),
|
||||
wxURI::Unescape(strProjectInstitution),
|
||||
wxURI::Unescape(strProjectDescription),
|
||||
wxURI::Unescape(strProjectKnown)
|
||||
);
|
||||
}
|
||||
} else if (ami.acct_mgr_url.size() && ami.have_credentials) {
|
||||
// Fall through
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue