]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/wxCDMNewProjectDialog.cpp
Feature #1711 CreaDevManager application implementation
[crea.git] / lib / creaDevManagerLib / wxCDMNewProjectDialog.cpp
index 45f30e70bf851d4577afe2c845bbf5c6f8e1bbe9..c3066a79be64f2741c28682a0db193f2d8cecca0 100644 (file)
@@ -2,7 +2,7 @@
 # ---------------------------------------------------------------------
 #
 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-#                        pour la Santé)
+#                        pour la Sant)
 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
@@ -30,7 +30,7 @@
  * wxCDMNewProjectDialog.cpp
  *
  *  Created on: 13/11/2012
- *      Author: daniel
+ *      Author: Daniel Felipe Gonzalez Obando
  */
 
 #include "wxCDMNewProjectDialog.h"
@@ -97,10 +97,10 @@ void wxCDMNewProjectDialog::CreateControls()
   wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
 
 
-  wxStaticText* title = new wxStaticText(this, wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
+  wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Create a new project"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
   v_sizer1->Add(title, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
 
-  wxStaticText* instruction = new wxStaticText(this, wxID_ANY, wxString("Please fill the following details."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
+  wxStaticText* instruction = new wxStaticText(this, wxID_ANY, wxT("Please fill the following details."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
   v_sizer1->Add(instruction, 0, wxALIGN_LEFT | wxALL | wxALIGN_CENTER_VERTICAL, 5);
 
   wxFlexGridSizer* formItems = new wxFlexGridSizer(4,2,9,15);
@@ -111,8 +111,8 @@ void wxCDMNewProjectDialog::CreateControls()
   wxStaticText *stxtPrjPkg = new wxStaticText(this, -1, wxT("Default Package's Description (HTML)"));
 
   wxBoxSizer* h_sizer1 = new wxBoxSizer(wxHORIZONTAL);
-  wxButton *ddPrjLocBtn = new wxButton(this, ID_BUTTON_CHOOSE, wxString("Choose directory..."));
-  this->projectLocation = new wxStaticText(this, -1, wxString(""));
+  wxButton *ddPrjLocBtn = new wxButton(this, ID_BUTTON_CHOOSE, wxT("Choose directory..."));
+  this->projectLocation = new wxStaticText(this, -1, wxT(""));
   h_sizer1->Add(ddPrjLocBtn,0,wxALIGN_LEFT | wxLEFT | wxALIGN_CENTER_VERTICAL, 5);
   h_sizer1->Add(this->projectLocation,0,wxALIGN_LEFT | wxLEFT | wxALIGN_CENTER_VERTICAL, 5);
   h_sizer1->SetMinSize(wxSize(150, 20));
@@ -136,32 +136,32 @@ void wxCDMNewProjectDialog::CreateControls()
   v_sizer1->Add(formItems, 1, wxEXPAND | wxALL, 15);
 
   wxBoxSizer* h_sizer2 = new wxBoxSizer(wxHORIZONTAL);
-  h_sizer2->Add(new wxButton(this, ID_BUTTON_NEXT, wxString("Create Project")), 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
-  h_sizer2->Add(new wxButton(this, ID_BUTTON_CANCEL, wxString("Cancel")), 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
+  h_sizer2->Add(new wxButton(this, ID_BUTTON_NEXT, wxT("Create Project")), 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
+  h_sizer2->Add(new wxButton(this, ID_BUTTON_CANCEL, wxT("Cancel")), 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
 
   v_sizer1->Add(h_sizer2, 0, wxALIGN_RIGHT | wxRIGHT | wxBOTTOM | wxALIGN_CENTER_VERTICAL, 30);
 
   SetSizer(v_sizer1);
-  v_sizer1->SetSizeHints(this);
+  //v_sizer1->RecalcSizes();
 }
 
 void wxCDMNewProjectDialog::OnCreateProject(wxCommandEvent& event)
 {
   bool ready = true;
 
-  if(ready && this->projectName->GetValue() == wxString(""))
+  if(ready && this->projectName->GetValue() == wxT(""))
     {
-      wxMessageBox(wxString("The project name cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
+      wxMessageBox(wxT("The project name cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
       ready = false;
     }
-  if(ready && this->projectLocation->GetLabel() == wxString(""))
+  if(ready && this->projectLocation->GetLabel() == wxT(""))
     {
-      wxMessageBox(wxString("The project location cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
+      wxMessageBox(wxT("The project location cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
       ready = false;
     }
-  if(ready && this->packageAuthor->GetValue() == wxString(""))
+  if(ready && this->packageAuthor->GetValue() == wxT(""))
     {
-      wxMessageBox(wxString("The project's author cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
+      wxMessageBox(wxT("The project's author cannot be empty"),_T("Error"),wxOK | wxICON_ERROR);
       ready = false;
     }
 
@@ -181,7 +181,7 @@ void wxCDMNewProjectDialog::OnCancel(wxCommandEvent& event)
 
 void wxCDMNewProjectDialog::OnChooseLocation(wxCommandEvent& event)
 {
-  wxDirDialog* dialog = new wxDirDialog(this, "Choose the location of the new project");
+  wxDirDialog* dialog = new wxDirDialog(this, wxT("Choose the location of the new project"));
   dialog->ShowModal();
   this->projectLocation->SetLabel(dialog->GetPath());
   this->Update();