]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
If USER_CATALOG_RESOURCES_FILE is used, we don't take other Catalog Resources
authorribes <ribes>
Tue, 17 Nov 2009 09:46:33 +0000 (09:46 +0000)
committerribes <ribes>
Tue, 17 Nov 2009 09:46:33 +0000 (09:46 +0000)
files

src/ResourcesManager/ResourcesManager.cxx

index c874c7781296e2d4c0e117ae856d573c11cd76a2..d1707dffd97e7279ceb535d0e7acf6c2a3a04fc1 100644 (file)
@@ -86,8 +86,16 @@ ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException)
   _resourceManagerMap["best"]=&altcycl;
   _resourceManagerMap[""]=&altcycl;
 
-  std::string default_file("");
-  if (getenv("APPLI") != 0)
+  if (getenv("USER_CATALOG_RESOURCES_FILE") != 0)
+  {
+    std::string user_file("");
+    user_file = getenv("USER_CATALOG_RESOURCES_FILE");
+    _path_resources.push_back(user_file);
+  }
+  else
+  {
+    std::string default_file("");
+    if (getenv("APPLI") != 0)
     {
       default_file += getenv("HOME");
       default_file += "/";
@@ -95,7 +103,7 @@ ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException)
       default_file += "/CatalogResources.xml";
       _path_resources.push_back(default_file);
     }
-  else
+    else
     {
       if(!getenv("KERNEL_ROOT_DIR"))
        throw ResourcesException("you must define KERNEL_ROOT_DIR environment variable!! -> cannot load a CatalogResources.xml");
@@ -103,12 +111,6 @@ ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException)
       default_file += "/share/salome/resources/kernel/CatalogResources.xml";
       _path_resources.push_back(default_file);
     }
-
-  if (getenv("USER_CATALOG_RESOURCES_FILE") != 0)
-  {
-    std::string user_file("");
-    user_file = getenv("USER_CATALOG_RESOURCES_FILE");
-    _path_resources.push_back(user_file);
   }
 
   _lasttime=0;