]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMApplicationHelpDialog.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / wxCDMApplicationHelpDialog.cpp
index 44c9b6bef02f3a5c947d9467592a4a725e7db32c..d4aa18d76f3c99d620d5027640eda28a04ceec09 100644 (file)
@@ -146,12 +146,11 @@ void wxCDMApplicationHelpDialog::OnCMakeLists(wxCommandEvent& event)
       if(!this->application->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->application->GetCMakeLists() != NULL)
         {
-          int CMId = this->application->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->application->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -168,12 +167,11 @@ void wxCDMApplicationHelpDialog::OnCMakeLists(wxCommandEvent& event)
           if(!((modelCDMAppli*)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(((modelCDMAppli*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMAppli*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMAppli*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -189,12 +187,11 @@ void wxCDMApplicationHelpDialog::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->application->GetCMakeLists() != NULL)
         {
-          int CMId = this->application->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->application->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -208,12 +205,11 @@ void wxCDMApplicationHelpDialog::OnCMakeListsEnter(wxMouseEvent& event)
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_SELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED);
 
           if(((modelCDMAppli*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMAppli*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMAppli*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }
@@ -226,12 +222,11 @@ void wxCDMApplicationHelpDialog::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->application->GetCMakeLists() != NULL)
         {
-          int CMId = this->application->GetCMakeLists()->GetId();
-          newEvent->SetInt(CMId);
+          newEvent->SetClientData(this->application->GetCMakeLists());
           newEvent->SetId(0);
           wxPostEvent(this->GetParent(), *newEvent);
         }
@@ -245,12 +240,11 @@ void wxCDMApplicationHelpDialog::OnCMakeListsExit(wxMouseEvent& event)
         }
       if (node != NULL)
         {
-          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LIST_ITEM_DESELECTED);
+          wxCommandEvent* newEvent = new wxCommandEvent(wxEVT_COMMAND_LISTBOX_SELECTED);
 
           if(((modelCDMAppli*)node)->GetCMakeLists() != NULL)
             {
-              int CMId = ((modelCDMAppli*)node)->GetCMakeLists()->GetId();
-              newEvent->SetInt(CMId);
+              newEvent->SetClientData(((modelCDMAppli*)node)->GetCMakeLists());
               newEvent->SetId(0);
               wxPostEvent(this->GetParent(), *newEvent);
             }