X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMPackageConfigurationDialog.cpp;h=2ab63a65245ff07bbf6795340de6980032ee9463;hb=f10df58dfa9c4d8489fe35f57f796bcf37e5f9b4;hp=07a1525b50fb2eed499a3468c3d43860445e807d;hpb=35dd4d1ddf73a91d308cc49fc394104169936055;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp b/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp index 07a1525..2ab63a6 100644 --- a/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp +++ b/lib/creaDevManagerLib/wxCDMPackageConfigurationDialog.cpp @@ -97,7 +97,7 @@ void wxCDMPackageConfigurationDialog::CreateControls() wxFont font = Title1->GetFont(); font.SetWeight(wxFONTWEIGHT_BOLD); Title1->SetFont(font); - includesPanelSizer->Add(Title1, 0, wxEXPAND | wxALL, 5); + includesPanelSizer->Add(Title1, 0, wxEXPAND); //inclusion data std::map inclusions = this->package->Get3rdPartyLibraries(); @@ -128,10 +128,16 @@ void wxCDMPackageConfigurationDialog::CreateControls() wxCheckBox* ChBIncl = new wxCheckBox( includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); - ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " library is included in the project configuration for this library.")); + ChBIncl->SetToolTip(crea::std2wx( + "When this box is checked the " + it->first + " library\n" + "is included in the project configuration for\n" + "this package including the following instruction\n" + "in the package's folder CMakeLists.txt file:\n" + "SET(${BBTK_PACKAGE_NAME}_USE_" + it->first+ " ON)\n" + )); ChBIncl->SetName(crea::std2wx(it->first)); ChBIncl->SetValue(it->second); - includesGridSizer->Add(ChBIncl, 1, wxEXPAND); + includesGridSizer->Add(ChBIncl, 0, wxEXPAND); wxStaticText* LNmIncl = new wxStaticText(includesPanel, wxID_ANY, crea::std2wx(it->first)); includesGridSizer->Add(LNmIncl, 1, wxEXPAND); @@ -139,14 +145,14 @@ void wxCDMPackageConfigurationDialog::CreateControls() includesGridSizer->AddGrowableCol(1,1); - includesPanelSizer->Add(includesGridSizer, 1, wxEXPAND, 0); + includesPanelSizer->Add(includesGridSizer, 1, wxEXPAND | wxLEFT, 5); //Custom Libraries wxStaticText* Title2 = new wxStaticText(includesPanel, wxID_ANY, wxT("Custom Libraries:")); font = Title2->GetFont(); font.SetWeight(wxFONTWEIGHT_BOLD); Title2->SetFont(font); - includesPanelSizer->Add(Title2, 0, wxEXPAND | wxALL, 5); + includesPanelSizer->Add(Title2, 0, wxEXPAND); //inclusion data std::map inclusionsLibs = this->package->GetCustomLibraries(); @@ -177,10 +183,20 @@ void wxCDMPackageConfigurationDialog::CreateControls() wxCheckBox* ChBIncl = new wxCheckBox( includesPanel, ID_CHECK_INCLUDE_LIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); - ChBIncl->SetToolTip(crea::std2wx("When this box is checked the " + it->first + " custom library is included in the project configuration for this library.")); + ChBIncl->SetToolTip(crea::std2wx( + "When this box is checked the " + it->first + " custom\n" + "library is included in the project configuration for\n" + "this packages including the following code in the\n" + "package's folder CMakeLists.txt file:\n" + "SET(${BBTK_PACKAGE_NAME}_INCLUDE_DIRS\n" + " ../lib/"+ it->first + "\n" + ")\n" + "SET(${BBTK_PACKAGE_NAME}_LIBS\n" + " " + it->first+ "\n" + ")")); ChBIncl->SetName(crea::std2wx(it->first)); ChBIncl->SetValue(it->second); - includesLibGridSizer->Add(ChBIncl, 1, wxEXPAND); + includesLibGridSizer->Add(ChBIncl, 0, wxEXPAND); wxStaticText* LNmIncl = new wxStaticText(includesPanel, wxID_ANY, crea::std2wx(it->first)); includesLibGridSizer->Add(LNmIncl, 1, wxEXPAND); @@ -188,11 +204,11 @@ void wxCDMPackageConfigurationDialog::CreateControls() includesLibGridSizer->AddGrowableCol(1,1); - includesPanelSizer->Add(includesLibGridSizer, 1, wxEXPAND, 0); + includesPanelSizer->Add(includesLibGridSizer, 0, wxEXPAND | wxLEFT, 5); includesPanel->SetSizer(includesPanelSizer); - v_sizer1->Add(includesPanel, 1, wxEXPAND); + v_sizer1->Add(includesPanel, 1, wxEXPAND | wxALL, 10); v_sizer1->Add(new wxButton(this, wxID_OK, wxT("Close")), 0, wxALIGN_CENTER | wxRIGHT | wxBOTTOM, 30); @@ -207,17 +223,17 @@ void wxCDMPackageConfigurationDialog::OnFinish(wxCommandEvent& event) void wxCDMPackageConfigurationDialog::On3rdLibraryIncludeChange( wxCommandEvent& event) { - this->package->Set3rdPartyLibrary( - crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), - ((wxCheckBox*)event.GetEventObject())->GetValue() - ); + if(this->package->Set3rdPartyLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue())) + ((wxCheckBox*)event.GetEventObject())->SetValue(((wxCheckBox*)event.GetEventObject())->GetValue()); + else + ((wxCheckBox*)event.GetEventObject())->SetValue(!((wxCheckBox*)event.GetEventObject())->GetValue()); } void wxCDMPackageConfigurationDialog::OnCustomLibraryIncludeChange( wxCommandEvent& event) { - this->package->SetCustomLibrary( - crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), - ((wxCheckBox*)event.GetEventObject())->GetValue() - ); + if(this->package->SetCustomLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue())) + ((wxCheckBox*)event.GetEventObject())->SetValue(((wxCheckBox*)event.GetEventObject())->GetValue()); + else + ((wxCheckBox*)event.GetEventObject())->SetValue(!((wxCheckBox*)event.GetEventObject())->GetValue()); }