]> Creatis software - creaMaracasVisu.git/commitdiff
commit addition de couleur comboBox sur linux
authorJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Mon, 21 Jun 2010 13:04:55 +0000 (13:04 +0000)
committerJuan Prieto <Juan.Prieto@creatis.insa-lyon.fr>
Mon, 21 Jun 2010 13:04:55 +0000 (13:04 +0000)
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialogComboBox.h

index 19cbf847bdf706a946971beb4e213cb6293e7e88..4730763c14a87ca48b1c1c69414c7d7a683c04eb 100644 (file)
@@ -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<double> 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);
        
index ee5b947e8a7a5b1b9804dd6784dcd95c0dc8db64..c3c67f2f4c12746755a264366d43ec1edb722c95 100644 (file)
@@ -23,7 +23,7 @@
 #ifdef WIN32
 #define FILENAME "/data/colorsfunction.txt"
 #else
-#define FILENAME "~/.creaMaracasVisu/data/colorsfunction.txt"
+#define FILENAME "colorsfunction.txt"
 #endif