X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMSettingsDialog.cpp;h=5af4e79664d4eaf50adf0a9edbb33a5dba05d13e;hb=refs%2Fheads%2Fvtk7itk4wx3-mingw64;hp=306c5a82ce4fdd457bf89037e156bc88bebb366d;hpb=157fdd70097efc81cb9bcd3a3b19392b8a144655;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMSettingsDialog.cpp b/lib/creaDevManagerLib/wxCDMSettingsDialog.cpp index 306c5a8..5af4e79 100644 --- a/lib/creaDevManagerLib/wxCDMSettingsDialog.cpp +++ b/lib/creaDevManagerLib/wxCDMSettingsDialog.cpp @@ -100,21 +100,25 @@ void wxCDMSettingsDialog::CreateControls() wxStaticText* instruction = new wxStaticText(this, wxID_ANY, wxT("Change the values to modify the default behavior of the program."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); v_sizer1->Add(instruction, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL | wxEXPAND, 5); - wxFlexGridSizer* formItems = new wxFlexGridSizer(4,2,9,15); + wxFlexGridSizer* formItems = new wxFlexGridSizer(5,2,9,15); wxStaticText *stxtTextEditor = new wxStaticText(this, -1, wxT("Text Editor Command")); wxStaticText *stxtFileExplorer = new wxStaticText(this, -1, wxT("File Explorer Command")); wxStaticText *stxtTerminal = new wxStaticText(this, -1, wxT("Terminal Command")); wxStaticText *stxtHelpEnabled = new wxStaticText(this, -1, wxT("Help Enabled")); - +#ifndef _WIN32 + wxStaticText* stxtBuildCommand = new wxStaticText(this, -1, wxT("Build Command")); +#endif wxConfigBase* pConfig = wxConfigBase::Get(); this->textEditor = new wxTextCtrl(this, -1, pConfig->Read(wxT("TEXT_EDITOR"), crea::std2wx(CDMUtilities::TEXT_EDITOR))); this->fileExplorer = new wxTextCtrl(this, -1, pConfig->Read(wxT("FILE_EXPLORER"), crea::std2wx(CDMUtilities::FILE_EXPLORER))); this->terminal = new wxTextCtrl(this, -1, pConfig->Read(wxT("TERMINAL"), crea::std2wx(CDMUtilities::TERMINAL))); this->helpEnabled = new wxCheckBox(this, -1, wxT("")); - this->helpEnabled->SetValue(pConfig->Read(wxT("HELP"), true)); - + this->helpEnabled->SetValue(pConfig->Read(wxT("HELP"), true) != 0); +#ifndef _WIN32 + this->buildCommand = new wxTextCtrl(this, -1, pConfig->Read(wxT("BUILD_COMMAND"), crea::std2wx(CDMUtilities::BUILD_COMMAND))); +#endif formItems->Add(stxtTextEditor, 0, wxALIGN_CENTER_VERTICAL); formItems->Add(this->textEditor, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL); @@ -122,10 +126,13 @@ void wxCDMSettingsDialog::CreateControls() formItems->Add(this->fileExplorer, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL); formItems->Add(stxtTerminal, 0, wxALIGN_CENTER_VERTICAL); formItems->Add(this->terminal, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL); +#ifndef _WIN32 + formItems->Add(stxtBuildCommand, 0, wxALIGN_CENTER_VERTICAL); + formItems->Add(this->buildCommand, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL); +#endif formItems->Add(stxtHelpEnabled, 0, wxALIGN_CENTER_VERTICAL); formItems->Add(this->helpEnabled, 1, wxEXPAND); - formItems->AddGrowableCol(1,1); v_sizer1->Add(formItems, 1, wxEXPAND | wxALL, 15); @@ -149,6 +156,11 @@ void wxCDMSettingsDialog::OnFinish(wxCommandEvent& event) pConfig->Write(wxT("TERMINAL"), this->terminal->GetValue()); pConfig->Write(wxT("FILE_EXPLORER"), this->fileExplorer->GetValue()); pConfig->Write(wxT("HELP"), this->helpEnabled->GetValue()); +#ifndef _WIN32 + pConfig->Write(wxT("BUILD_COMMAND"), this->buildCommand->GetValue()); +#endif + + pConfig->Flush(); this->EndModal(wxID_OK); } @@ -163,5 +175,8 @@ void wxCDMSettingsDialog::OnDefaults(wxCommandEvent& event) this->textEditor->SetValue(crea::std2wx(CDMUtilities::TEXT_EDITOR)); this->terminal->SetValue(crea::std2wx(CDMUtilities::TERMINAL)); this->fileExplorer->SetValue(crea::std2wx(CDMUtilities::FILE_EXPLORER)); +#ifndef _WIN32 + this->buildCommand->SetValue(crea::std2wx(CDMUtilities::BUILD_COMMAND)); +#endif this->helpEnabled->SetValue(true); }