Salome HOME
Moved some functionality to VTKViewer_Utilities.h
[modules/kernel.git] / src / SALOMEGUI / QAD_HelpWindow.cxx
index 8cb020a7e063c0aab9369db3196a4ab551774633..2453ec7e4b31fee8986f9d63091cea1b8e9981a3 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : SALOME
 //  $Header$
 
-using namespace std;
 /*!
   \class QAD_HelpWindow QAD_HelpWindow.h
   \brief Html browser for help.
@@ -46,6 +45,7 @@ using namespace std;
 #include <qtoolbutton.h>
 #include <qcombobox.h>
 #include <qfileinfo.h>
+using namespace std;
 
 /*!
   Constructor
@@ -111,39 +111,39 @@ QAD_HelpWindow::QAD_HelpWindow()
 
   /*
   // look for index.html and set homeDir
-  // 1. $(SALOME_ROOT_DIR)/doc/index.html
-  // 2. $(SALOME_ROOT_DIR)/doc/html/index.html
-  // 3. $(SALOME_ROOT_DIR)/doc/html/html/index.html
+  // 1. $(KERNEL_ROOT_DIR)/doc/index.html
+  // 2. $(KERNEL_ROOT_DIR)/doc/html/index.html
+  // 3. $(KERNEL_ROOT_DIR)/doc/html/html/index.html
   // 4. /usr/local/doc/html/index.html
 
   QCString dir;
   QString root;
   if ( (dir = getenv("KERNEL_ROOT_DIR")) ) {
-  root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + QAD_Tools::addSlash("share")  + QAD_Tools::addSlash("salome")  + "doc" );
-  if ( QFileInfo( root + "index.html" ).exists() ) {
-  homeDir = root;
-  }
-  else {
-  root = QAD_Tools::addSlash( root + "html" );
-  if ( QFileInfo( root + "index.html" ).exists() ) {
-  homeDir = root;
-  }
-  else {
-  root = QAD_Tools::addSlash( root + "html" );
-  if ( QFileInfo( root + "index.html" ).exists() ) {
-  homeDir = root;
-  }
-  }
-  }
+    root = QAD_Tools::addSlash( QAD_Tools::addSlash(dir) + QAD_Tools::addSlash("share")  + QAD_Tools::addSlash("salome")  + "doc" );
+    if ( QFileInfo( root + "index.html" ).exists() ) {
+      homeDir = root;
+    }
+    else {
+      root = QAD_Tools::addSlash( root + "html" );
+      if ( QFileInfo( root + "index.html" ).exists() ) {
+       homeDir = root;
+      }
+      else {
+       root = QAD_Tools::addSlash( root + "html" );
+       if ( QFileInfo( root + "index.html" ).exists() ) {
+         homeDir = root;
+       }
+      }
+    }
   }
   if ( root.isEmpty() ) {
-  if ( QFileInfo( "/usr/local/doc/html/index.html" ).exists() ) {
-  homeDir = "/usr/local/doc/html/";
-  }
+    if ( QFileInfo( "/usr/local/doc/html/index.html" ).exists() ) {
+      homeDir = "/usr/local/doc/html/";
+    }
   }
   if ( root.isEmpty() ) 
-  root = "./doc/";
-  
+    root = "./doc/";
+
   browser->setSource( QFileInfo( homeDir + "index.html" ).absFilePath() );
   */
   browser->setFocus();