Ticket #257: boincmgr_257.patch

File boincmgr_257.patch, 1.0 kB (added by Der Meister, 7 months ago)

Patch adding the necessary check to the wizard

  • ../clientgui/ProjectInfoPage.cpp

    old new  
    178178        // Cancel Event Detected 
    179179        return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE); 
    180180    } else { 
     181        // Check if we are already attached to that project: 
     182        CMainDocument* pDoc = wxGetApp().GetDocument(); 
     183        for (unsigned int i = 0; i < pDoc->GetProjectCount(); ++i) { 
     184            PROJECT* project = pDoc->project(i); 
     185            if ((project) && (project->master_url == m_strProjectURL)) { 
     186                // We are already attached to that project. Show the error page: 
     187                return PAGE_TRANSITION_NEXT(ID_ERRALREADYATTACHEDPAGE); 
     188            } 
     189        } 
     190        // New project, proceed with normal attach procedure: 
    181191        return PAGE_TRANSITION_NEXT(ID_PROJECTPROPERTIESPAGE); 
    182192    } 
    183193    return NULL; 

If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.