From: Eduardo DAVILA Date: Wed, 20 Sep 2017 18:45:08 +0000 (+0200) Subject: #3128 creaMaracasVisu Feature New Normal - branch changeWx28to30 compilation with... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=66af9da117f6c1cbf4c4756520578ea6e9d94a68;p=creaMaracasVisu.git #3128 creaMaracasVisu Feature New Normal - branch changeWx28to30 compilation with wxWidgets3 --- diff --git a/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx b/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx index 4f54431..90fc918 100644 --- a/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx +++ b/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx @@ -289,7 +289,19 @@ ToolBar::ToolBar(wxWindow * parent,std::string iconsdir) //iconfil+= "/OpenImage.png"; //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG); wxBitmap bitmap0(OpenImage_xpm); + +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 this->AddTool(1, wxString(_T("test")),bitmap0, NULL, wxITEM_NORMAL, wxString(_T("Open File"))); +#else + this->AddTool(1, + wxString("test"), + bitmap0, + NULL, + wxITEM_NORMAL, + wxString("Open File") ); +#endif + /*iconfil+= "/Open.png"; wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx index b9f8386..7b98936 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx @@ -346,6 +346,9 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT //------------------------------------------------------------------------ void WidgetShowNPoints::OnSavePoints(wxCommandEvent& event) { + +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 wxFileDialog* FD = new wxFileDialog( 0, _T("Save points .."), _T(""), @@ -353,7 +356,17 @@ void WidgetShowNPoints::OnInsertPoint (wxCommandEvent& event)//CFT _T("(*.xls)|*.xls"), wxSAVE | wxOVERWRITE_PROMPT, wxDefaultPosition); - //EED +#else + wxFileDialog* FD = new wxFileDialog( 0, + _T("Save points .."), + _T(""), + _T(""), + _T("(*.xls)|*.xls"), + wxFD_SAVE | wxFD_OVERWRITE_PROMPT, + wxDefaultPosition); +#endif + + int result_FD = FD->ShowModal();