Index: /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh
===================================================================
--- /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 734)
+++ /trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh	(revision 735)
@@ -118,4 +118,5 @@
   bool generatePS_PDF(QString,int,QImage);  
   void showMovieParametersDialog();
+  void initMovieParameters();
 
 #if QT_VERSION < 0x040000
Index: /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc
===================================================================
--- /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc	(revision 734)
+++ /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtMovieDialog.cc	(revision 735)
@@ -103,4 +103,6 @@
   encoderVGroupBoxLayout->add(encoderHBox);
   encoderVGroupBoxLayout->add(fEncoderStatus);
+
+  globalVLayout->add(encoderGroupBox);
 #else
   encoderHBoxLayout->addWidget(fEncoderPath);
@@ -108,16 +110,10 @@
   encoderVGroupBoxLayout->addWidget(encoderHBox);
   encoderVGroupBoxLayout->addWidget(fEncoderStatus);
-#endif
-
-#if QT_VERSION >= 0x040000
+
   encoderGroupBox->setLayout(encoderVGroupBoxLayout);
-#endif
+  globalVLayout->addWidget(encoderGroupBox);
+#endif
+
   connect( encoderButton, SIGNAL( clicked( ) ), this, SLOT(selectEncoderPathAction() ) );
-
-#if QT_VERSION < 0x040000
-  globalVLayout->add(encoderGroupBox);
-#else
-  globalVLayout->addWidget(encoderGroupBox);
-#endif
 
   fEncoderPath->setText(fParentViewer->getEncoderPath());
@@ -145,4 +141,6 @@
   tempFolderVGroupBoxLayout->add(tempFolderHBox);
   tempFolderVGroupBoxLayout->add(fTempFolderStatus);
+
+  globalVLayout->add(tempFolderGroupBox);
 #else
   tempFolderHBoxLayout->addWidget(fTempFolderPath);
@@ -150,16 +148,10 @@
   tempFolderVGroupBoxLayout->addWidget(tempFolderHBox);
   tempFolderVGroupBoxLayout->addWidget(fTempFolderStatus);
-#endif
-
-#if QT_VERSION >= 0x040000
+
   tempFolderGroupBox->setLayout(tempFolderVGroupBoxLayout);
-#endif
+  globalVLayout->addWidget(tempFolderGroupBox);
+#endif
+
   connect( tempButton, SIGNAL( clicked( ) ), this, SLOT(selectTempPathAction() ) );
-
-#if QT_VERSION < 0x040000
-  globalVLayout->add(tempFolderGroupBox);
-#else
-  globalVLayout->addWidget(tempFolderGroupBox);
-#endif
 
   fTempFolderPath->setText(fParentViewer->getTempFolderPath());
@@ -188,4 +180,6 @@
   saveFileVGroupBoxLayout->add(saveFileHBox);
   saveFileVGroupBoxLayout->add(fSaveFileStatus);
+
+  globalVLayout->add(saveFileGroupBox);
 #else
   saveFileHBoxLayout->addWidget(fSaveFileName);
@@ -193,16 +187,11 @@
   saveFileVGroupBoxLayout->addWidget(saveFileHBox);
   saveFileVGroupBoxLayout->addWidget(fSaveFileStatus);
-#endif
-
-#if QT_VERSION >= 0x040000
+
   saveFileGroupBox->setLayout(saveFileVGroupBoxLayout);
-#endif
+  globalVLayout->addWidget(saveFileGroupBox);
+#endif
+
   connect( saveButton, SIGNAL( clicked( ) ), this, SLOT(selectSaveFileNameAction() ) );
 
-#if QT_VERSION < 0x040000
-  globalVLayout->add(saveFileGroupBox);
-#else
-  globalVLayout->addWidget(saveFileGroupBox);
-#endif
 
 
@@ -212,12 +201,20 @@
 
   // global status
-  fGlobalStatus = new QLabel("");
-
-#if QT_VERSION < 0x040000
+  QGroupBox *statusGroupBox = new QGroupBox(tr("Status"));
+  QVBoxLayout *statusVGroupBoxLayout = new QVBoxLayout(statusGroupBox);
+  fGlobalStatus = new QLabel(statusGroupBox);
+  fGlobalStatus->setText("");
+
+#if QT_VERSION < 0x040000
+  statusVGroupBoxLayout->add(fGlobalStatus);
+
   globalVLayout->add(infoLabel);
-  globalVLayout->add(fGlobalStatus);
-#else
+  globalVLayout->add(statusGroupBox);
+#else
+  statusVGroupBoxLayout->addWidget(fGlobalStatus);
+
+  statusGroupBox->setLayout(statusVGroupBoxLayout);
   globalVLayout->addWidget(infoLabel);
-  globalVLayout->addWidget(fGlobalStatus);
+  globalVLayout->addWidget(statusGroupBox);
 #endif
 
@@ -236,4 +233,5 @@
 
   QPushButton * buttonEncode = new QPushButton( tr( "&Encode" ),buttonBox );
+  buttonEncode->setEnabled(false); 
   buttonEncode->setAutoDefault( TRUE );
   buttonEncode->setDefault( TRUE );
@@ -320,5 +318,5 @@
   if (temp != "") {
     palette.setColor( QPalette::Base, Qt::red);
-    fGlobalStatus->setText("If no valid encode defined, screnn /ncapture files will be saved in /nthe temp folder in ppm format.");
+    fGlobalStatus->setText("If no valid encode defined, screnn \ncapture files will be saved in the\ntemp folder in ppm format.");
   } else {
     palette.setColor( QPalette::Base, Qt::white);
Index: /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
===================================================================
--- /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 734)
+++ /trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc	(revision 735)
@@ -301,8 +301,7 @@
   ,fHoldRotateEvent(false)
   ,fAutoMove(false)
-  ,fEncoderPath("")
-  ,fTempFolderPath("/temp")
   ,fMovieParametersDialog(NULL)
 {
+  initMovieParameters();
 #ifdef GEANT4_QT_DEBUG
   printf("G4OpenGLQtViewer::G4OpenGLQtViewer \n");
@@ -2145,14 +2144,122 @@
   
 
-/** @return if encoder path was not specified, try to guess it.
- * if path was already specified, return it.Else return ""
+/** @return encoder path or "" if it does not exist
  */
 QString G4OpenGLQtViewer::getEncoderPath() {
 
-   if (fEncoderPath.isNull())
-     fEncoderPath ="";
-   if (fEncoderPath.isEmpty()) {
-  
-     //look for encoderPath
+   if (!fEncoderPath.isNull())
+    return fEncoderPath ;
+   return "";
+}
+ 
+
+/**
+ * set the new encoder path
+ * @return "" if correct. The error otherwise
+*/
+QString G4OpenGLQtViewer::setEncoderPath(QString path) {
+  if (path == "") {
+    return "Path does not exist";
+  }
+  QFile *f = new QFile(path);
+  if (!f->exists()) {
+    return "Path does not exist";
+  }
+  if (!(f->permissions() & QFile::ExeUser)) {
+    return "File exist but is not executable";
+  }
+  fEncoderPath = path;
+  return "";
+}
+
+/**
+ * set the temp folder path
+ * @return "" if correct. The error otherwise
+*/
+QString G4OpenGLQtViewer::setTempFolderPath(QString path) {
+
+  if (path == "") {
+    return "Path does not exist";
+  }
+  QDir *d = new QDir(path);
+  if (!d->exists(path)) {
+    return "Path does not exist";
+  }
+
+  d->setFilter( QDir::Dirs | QDir::Readable | QDir::Writable );
+  QStringList subDirList = d->entryList();
+  bool found = false;
+
+  for (QStringList::ConstIterator it = subDirList.begin() ;(it != subDirList.end()) ; it++) {
+    const QString currentDir = *it;
+    
+    if (currentDir == ".") { // we found it
+      found = true;
+    }
+  }
+
+  if (!found)
+    return "Path exist, but is not write accessible";
+  
+  fTempFolderPath = path;
+  return "";
+}
+
+/** @return the temp folder path or "" if it does not exist
+ */
+QString G4OpenGLQtViewer::getTempFolderPath() {
+  if (!fTempFolderPath.isNull())
+    return fTempFolderPath ;
+return "";
+}
+ 
+/**
+ * set the save file name path
+ * @return "" if correct. The error otherwise
+*/
+QString G4OpenGLQtViewer::setSaveFileName(QString path) {
+
+  if (path == "") {
+    return "Path does not exist";
+  }
+  QDir *d = new QDir(path);
+  if (!d->exists(path)) {
+    return "Path does not exist";
+  }
+
+  d->setFilter( QDir::Dirs | QDir::Readable | QDir::Writable );
+  QStringList subDirList = d->entryList();
+  bool found = false;
+
+  for (QStringList::ConstIterator it = subDirList.begin() ;(it != subDirList.end()) ; it++) {
+    const QString currentDir = *it;
+    
+    if (currentDir == ".") { // we found it
+      found = true;
+    }
+  }
+
+  if (!found)
+    return "Path exist, but is not write accessible";
+  
+  fSaveFileName = path;
+  return "";
+}
+
+/** @return the save file path
+ */
+QString G4OpenGLQtViewer::getSaveFileName() {
+  return fSaveFileName ;
+}
+
+/** Init the movie parameters. Temp dir and encoder path
+*/
+void G4OpenGLQtViewer::initMovieParameters() {
+#ifdef GEANT4_QT_DEBUG
+  printf("G4OpenGLQtViewer::--------\n");
+#endif
+  //init encoder
+  
+   //look for encoderPath
      QProcess search;
      search.setReadChannelMode(QProcess::MergedChannels);
@@ -2168,104 +2275,11 @@
        }
      }
-   }
-  return fEncoderPath ;
-}
- 
-
-/**
- * set the new encoder path
- * @return "" if correct. The error otherwise
-*/
-QString G4OpenGLQtViewer::setEncoderPath(QString path) {
-  QFile *f = new QFile(path);
-  if (!f->exists()) {
-#ifdef GEANT4_QT_DEBUG
-  printf("G4OpenGLQtViewer::setEncoderPath NOT EXIST\n");
-#endif
-    return "Path does not exist";
-  }
-  if (!(f->permissions() & QFile::ExeUser)) {
-#ifdef GEANT4_QT_DEBUG
-  printf("G4OpenGLQtViewer::setEncoderPath No WRITE ACCES\n");
-#endif
-    return "File exist but is not executable";
-  }
-  fEncoderPath = path;
-  return "";
-}
-
-/**
- * set the temp folder path
- * @return "" if correct. The error otherwise
-*/
-QString G4OpenGLQtViewer::setTempFolderPath(QString path) {
-
-  QDir *d = new QDir(path);
-  if (!d->exists(path)) {
-    return "Path does not exist";
-  }
-
-  d->setFilter( QDir::Dirs | QDir::Readable | QDir::Writable );
-  QStringList subDirList = d->entryList();
-  bool found = false;
-
-  for (QStringList::ConstIterator it = subDirList.begin() ;(it != subDirList.end()) ; it++) {
-    const QString currentDir = *it;
-    
-    if (currentDir == ".") { // we found it
-      found = true;
-    }
-  }
-
-  if (!found)
-    return "Path exist, but is not write accessible";
-  
-  fTempFolderPath = path;
-  return "";
-}
-
-/** @return the temp folder path
- */
-QString G4OpenGLQtViewer::getTempFolderPath() {
-  return fTempFolderPath ;
-}
- 
-/**
- * set the save file name path
- * @return "" if correct. The error otherwise
-*/
-QString G4OpenGLQtViewer::setSaveFileName(QString path) {
-
-  QDir *d = new QDir(path);
-  if (!d->exists(path)) {
-    return "Path does not exist";
-  }
-
-  d->setFilter( QDir::Dirs | QDir::Readable | QDir::Writable );
-  QStringList subDirList = d->entryList();
-  bool found = false;
-
-  for (QStringList::ConstIterator it = subDirList.begin() ;(it != subDirList.end()) ; it++) {
-    const QString currentDir = *it;
-    
-    if (currentDir == ".") { // we found it
-      found = true;
-    }
-  }
-
-  if (!found)
-    return "Path exist, but is not write accessible";
-  
-  fSaveFileName = path;
-  return "";
-}
-
-/** @return the save file path
- */
-QString G4OpenGLQtViewer::getSaveFileName() {
-  return fSaveFileName ;
-}
-
- 
+     setEncoderPath(fEncoderPath);
+// init temp folder
+  setTempFolderPath(QDir::temp ().absolutePath ());
+#ifdef GEANT4_QT_DEBUG
+  printf("G4OpenGLQtViewer::--------\n");
+#endif
+}
 
 
