From 1e68cd7b706bf3b775b959d51f2fd5d83299220c Mon Sep 17 00:00:00 2001 From: Juan Prieto Date: Mon, 21 Jun 2010 13:04:55 +0000 Subject: [PATCH] commit addition de couleur comboBox sur linux --- .../pPlotter/HistogramDialogComboBox.cxx | 21 +++++++++++++++++-- .../pPlotter/HistogramDialogComboBox.h | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.cxx index 19cbf84..4730763 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.cxx @@ -23,6 +23,11 @@ HistogramDialogComboBox::HistogramDialogComboBox(wxWindow* parent) _currentitem = -1; _maxgreyvalue = 0; printf("EED HistogramDialogComboBox\n"); +#ifdef LINUX + std::string currentpath = crea::System::GetExecutablePath(); + currentpath.append("/data/"); + crea::System::createDirectory(currentpath.c_str()); +#endif } HistogramDialogComboBox::~HistogramDialogComboBox() @@ -141,8 +146,16 @@ void HistogramDialogComboBox::OnEditBitmapCombo(wxCommandEvent& event) _bitmapsitems = dialog->getComboBoxItems(); //std::string currentpath = crea::System::GetDllAppPath("bbcreaMaracasVisu"); // JPR - std::string dllLastName("bbcreaMaracasVisu"); - std::string currentpath = crea::System::GetDllAppPath(dllLastName); + std::string dllLastName; + std::string currentpath; + #ifdef WIN32 + dllLastName = "bbcreaMaracasVisu"; + currentpath = crea::System::GetDllAppPath(dllLastName); + #endif + #ifdef LINUX + currentpath = crea::System::GetExecutablePath(); + currentpath.append("/data/"); + #endif currentpath.append(FILENAME); std::vector redvect,greenvect,bluevect; @@ -226,6 +239,10 @@ wxBitmapComboBox* HistogramDialogComboBox::getBitmapComboElements() std::string currentpath = ""; #ifdef WIN32 currentpath = crea::System::GetDllAppPath("bbcreaMaracasVisu"); +#endif +#ifdef LINUX + currentpath = crea::System::GetExecutablePath(); + currentpath.append("/data/"); #endif currentpath.append(FILENAME); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.h index ee5b947..c3c67f2 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.h @@ -23,7 +23,7 @@ #ifdef WIN32 #define FILENAME "/data/colorsfunction.txt" #else -#define FILENAME "~/.creaMaracasVisu/data/colorsfunction.txt" +#define FILENAME "colorsfunction.txt" #endif -- 2.45.2