]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMPackageHelpDialog.cpp
Fixes:
[crea.git] / lib / creaDevManagerLib / wxCDMPackageHelpDialog.cpp
index c7b468eeb2739b27a3887660c2949d3548d655a2..83d7e1d4e428871f95e037491a3e9af2034d92b8 100644 (file)
@@ -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);
             }