X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMPackageHelpDialog.cpp;h=83d7e1d4e428871f95e037491a3e9af2034d92b8;hb=1c3bc8de4d0e9b492f95c5d8c468881a80f420da;hp=c7b468eeb2739b27a3887660c2949d3548d655a2;hpb=b8ae511b1e62c48bf4a418a13812d3ada5063550;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMPackageHelpDialog.cpp b/lib/creaDevManagerLib/wxCDMPackageHelpDialog.cpp index c7b468e..83d7e1d 100644 --- a/lib/creaDevManagerLib/wxCDMPackageHelpDialog.cpp +++ b/lib/creaDevManagerLib/wxCDMPackageHelpDialog.cpp @@ -100,8 +100,12 @@ void wxCDMPackageHelpDialog::CreateControls() "If you want to check the files in the file explorer click the \"Open Package Folder\" " "button.\n" "\n" - "Don't forget to include the libraries your black boxes use in the Package directory CMakeLists.txt file\n" - "Also, make sure you include this package in the Project directory CMakeLists.txt file\n" + "Don't forget to include the libraries your black boxes use in the Package directory CMakeLists.txt file by " + "uncommenting the \"SET\" commands for third party libraries or by including the library name inside the " + "\"SET(${BBTK_PACKAGE_NAME}_LIBS\"command and its path inside the \"SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS\" " + "command for custom libraries.\n" + "Also, make sure you include this package in the Project directory's CMakeLists.txt file\n using the " + "ADD_SUBDIRECTORY([packageName]) command.\n" "You can open these files with the following buttons."), wxDefaultPosition, wxDefaultSize, @@ -137,12 +141,11 @@ void wxCDMPackageHelpDialog::OnCMakeLists(wxCommandEvent& event) if(!this->package->OpenCMakeListsFile(result)) wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR); - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); + wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED); if(this->package->GetCMakeLists() != NULL) { - int CMId = this->package->GetCMakeLists()->GetId(); - newEvent->SetInt(CMId); + newEvent->SetClientData(this->package->GetCMakeLists()); newEvent->SetId(0); wxPostEvent(this->GetParent(), *newEvent); } @@ -159,12 +162,11 @@ void wxCDMPackageHelpDialog::OnCMakeLists(wxCommandEvent& event) if(!((modelCDMProject*)node)->OpenCMakeListsFile(result)) wxMessageBox(crea::std2wx(*result),_T("Open CMakeLists File - Error!"),wxOK | wxICON_ERROR); - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); + wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED); if(((modelCDMProject*)node)->GetCMakeLists() != NULL) { - int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId(); - newEvent->SetInt(CMId); + newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists()); newEvent->SetId(0); wxPostEvent(this->GetParent(), *newEvent); } @@ -180,12 +182,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsEnter(wxMouseEvent& event) { if(((wxButton*)event.GetEventObject())->GetId() == ID_BUTTON_EDIT_CMAKELISTSFILE) { - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED); + wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED); if(this->package->GetCMakeLists() != NULL) { - int CMId = this->package->GetCMakeLists()->GetId(); - newEvent->SetInt(CMId); + newEvent->SetClientData(this->package->GetCMakeLists()); newEvent->SetId(0); wxPostEvent(this->GetParent(), *newEvent); } @@ -199,12 +200,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsEnter(wxMouseEvent& event) } if (node != NULL) { - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED); + wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED); if(((modelCDMProject*)node)->GetCMakeLists() != NULL) { - int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId(); - newEvent->SetInt(CMId); + newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists()); newEvent->SetId(0); wxPostEvent(this->GetParent(), *newEvent); } @@ -217,12 +217,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsExit(wxMouseEvent& event) { if(((wxButton*)event.GetEventObject())->GetId() == ID_BUTTON_EDIT_CMAKELISTSFILE) { - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); + wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED); if(this->package->GetCMakeLists() != NULL) { - int CMId = this->package->GetCMakeLists()->GetId(); - newEvent->SetInt(CMId); + newEvent->SetClientData(this->package->GetCMakeLists()); newEvent->SetId(0); wxPostEvent(this->GetParent(), *newEvent); } @@ -236,12 +235,11 @@ void wxCDMPackageHelpDialog::OnCMakeListsExit(wxMouseEvent& event) } if (node != NULL) { - wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED); + wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED); if(((modelCDMProject*)node)->GetCMakeLists() != NULL) { - int CMId = ((modelCDMProject*)node)->GetCMakeLists()->GetId(); - newEvent->SetInt(CMId); + newEvent->SetClientData(((modelCDMProject*)node)->GetCMakeLists()); newEvent->SetId(0); wxPostEvent(this->GetParent(), *newEvent); }