this->versiontc = new wxStaticText(propertiesPanel, wxID_ANY, crea::std2wx(this->project->GetVersion()));
wxButton* pVersionbt = new wxButton(propertiesPanel, ID_BUTTON_SET_VERSION, wxT("Set"));
pVersionbt->SetToolTip(wxT("Update the version of the project."));
- pVersionsz->Add(this->versiontc, 0, wxALIGN_CENTER_VERTICAL, 0);
- pVersionsz->Add(pVersionbt, 0, wxALIGN_CENTER | wxLEFT, 10);
+ pVersionsz->Add(this->versiontc, 1, wxALIGN_CENTER, 1);
+ pVersionsz->Add(pVersionbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
// versionDate
this->versionDatetc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetVersionDate()));
// sourceLocation
wxBoxSizer* pSourceLocationsz = new wxBoxSizer(wxHORIZONTAL);
wxStaticText* pSourceLocationtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetPath()));
- pSourceLocationtc->SetMaxSize(wxSize(350,-1));
+ //pSourceLocationtc->SetMaxSize(wxSize(350,-1));
wxButton* pSourceLocationbt = new wxButton(propertiesPanel, ID_BUTTON_OPEN_FOLDER, wxT("Open"));
pSourceLocationbt->SetToolTip(wxT("Open the source folder in the file explorer."));
- pSourceLocationsz->Add(pSourceLocationtc, 0, wxALIGN_CENTER, 0);
+ pSourceLocationsz->Add(pSourceLocationtc, 1, wxALIGN_CENTER, 1);
pSourceLocationsz->Add(pSourceLocationbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
// buildLocation
wxBoxSizer* pBuildLocationsz = new wxBoxSizer(wxHORIZONTAL);
this->buildPathtc = new wxStaticText(propertiesPanel, -1, crea::std2wx(this->project->GetBuildPath()));
- this->buildPathtc->SetMaxSize(wxSize(350,-1));
+ //this->buildPathtc->SetMaxSize(wxSize(350,-1));
wxButton* pBuildLocationbt = new wxButton(propertiesPanel, ID_BUTTON_SET_BUILD_PATH, wxT("Choose"));
pBuildLocationbt->SetToolTip(wxT("Select a new location for compiling the project."));
- pBuildLocationsz->Add(this->buildPathtc, 0, wxALIGN_CENTER, 0);
+ pBuildLocationsz->Add(this->buildPathtc, 1, wxALIGN_CENTER, 1);
pBuildLocationsz->Add(pBuildLocationbt, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 10);
propertiesGridSizer->Add(pVersion, 0, wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
propertiesGridSizer->AddGrowableCol(1,1);
- propertiesPanelSizer-> Add(propertiesGridSizer, 0, wxALL | wxEXPAND, 5);
+ propertiesPanelSizer-> Add(propertiesGridSizer, 1, wxALL | wxEXPAND, 5);
//SetPanel sizer and box
propertiesPanel->SetSizer(propertiesPanelSizer);
propertiesPanelSizer->Fit(propertiesPanel);
- propertiesBox->Add(propertiesPanel, 0, wxEXPAND);
+ propertiesBox->Add(propertiesPanel, 1, wxEXPAND);
sizer->Add(propertiesBox, 0, wxEXPAND | wxALL, 10);
//----------------------------------Project Actions--------------------------------------
// package manager
wxButton* packageMgrbt = new wxButton(actionsPanel, ID_BUTTON_GOTO_PACKAGE_MANAGER, _T("Package Manager"));
packageMgrbt->SetToolTip(wxT("Find the current available packages into this project. You can also create new Packages in this section."));
- actionsPanelSizer->Add(packageMgrbt, 0, wxALL, 5);
+ actionsPanelSizer->Add(packageMgrbt, 1, wxALL, 5);
// lib manager
// show only if there is a lib folder
if(this->project->GetLib() != NULL)
libMgrbt->SetToolTip(wxT("Find the current available libraries into this project. You can also create new Libraries in this section as well as edit the lib folder's CMakeLists.txt file."));
libMgrbt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnLibMouseEnter,NULL,this);
libMgrbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnLibMouseExit,NULL,this);
- actionsPanelSizer->Add(libMgrbt, 0, wxALL, 5);
+ actionsPanelSizer->Add(libMgrbt, 1, wxALL, 5);
}
// appli manager
// show only if there is a appli folder
appliMgrbt->SetToolTip(wxT("Find the current available applications into this project. You can also create new Applications in this section as well as edit the appli folder's CMakeLists.txt file."));
appliMgrbt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnAppliMouseEnter,NULL,this);
appliMgrbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnAppliMouseExit,NULL,this);
- actionsPanelSizer->Add(appliMgrbt, 0, wxALL, 5);
+ actionsPanelSizer->Add(appliMgrbt, 1, wxALL, 5);
}
// edit CMakeLists file
wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file of this project."));
editCMakebt->Connect(wxEVT_ENTER_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnCMakeMouseEnter,NULL,this);
editCMakebt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnCMakeMouseExit,NULL,this);
- actionsPanelSizer->Add(editCMakebt, 0, wxALL, 5);
+ actionsPanelSizer->Add(editCMakebt, 1, wxALL, 5);
//SetPanel sizer and box
actionsPanel->SetSizer(actionsPanelSizer);
actionsPanelSizer->Fit(actionsPanel);
- actionsBox->Add(actionsPanel, 0, wxALL, 5);
+ actionsBox->Add(actionsPanel, 1, wxALL | wxEXPAND, 5);
sizer->Add(actionsBox, 0, wxEXPAND | wxALL, 10);
void wxCDMProjectDescriptionPanel::OnBtnSetVersion(wxCommandEvent& event)
{
- //TODO: implement method
- std::cerr << "Event OnBtnSetVersion not implemented" << std::endl;
- event.Skip();
-
- //get name
+ //get version
wxString libraryName = wxGetTextFromUser(
wxT("Enter the new version name"),
- wxT("New Library - creaDevManager"),
+ wxT("Change Project Version - creaDevManager"),
crea::std2wx(this->project->GetVersion())
);
//check name