Salome HOME
1) disable setting the temporary directory from GUI;
authorakl <akl@opencascade.com>
Mon, 13 Aug 2007 13:37:00 +0000 (13:37 +0000)
committerakl <akl@opencascade.com>
Mon, 13 Aug 2007 13:37:00 +0000 (13:37 +0000)
2) required disk space for sources and intermediate files will be shown in the "Space for temporary files" field, if user selected "install sources and build" type and checked "remove sources after compilation";
3) skip checking the available disk space for temporary files, because all files are unpucked into installation directory;
4) fix some bugs.

src/SALOME_InstallWizard.cxx

index 28eeb135e62501d00480d7e5214167d9f2b618e9..ac09dffa59ebebc0f808a710c37412e5b371cb5a 100644 (file)
@@ -1025,6 +1025,11 @@ void SALOME_InstallWizard::setupDirPage()
   tempLayout->addMultiCellWidget( tempLab,    0, 0, 0, 1 );
   tempLayout->addWidget         ( tempFolder, 1,    0    );
   tempLayout->addWidget         ( tempBtn,    1,    1    );
+  // AKL: 13/08/07 - disable temporary directory setting in GUI ==>
+  tempLab->hide();
+  tempFolder->hide();
+  tempBtn->hide();
+  // AKL: 13/08/07 - disable temporary directory setting in GUI <==
   // layout widgets
   pageLayout->addItem  ( spacer1,      0, 0 );
   pageLayout->addLayout( targetLayout, 1, 0 );
@@ -1040,7 +1045,7 @@ void SALOME_InstallWizard::setupDirPage()
   connect( tempBtn,       SIGNAL( clicked() ), this, SLOT( browseDirectory() ) );
 
   // adding page
-  addPage( dirPage, tr( "Installation directories" ) );
+  addPage( dirPage, tr( "Installation directory" ) );
 }
 // ================================================================
 /*!
@@ -1484,6 +1489,9 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
     // ########## check if any products are selected to be installed
     long totSize, tempSize;
     bool anySelected = checkSize( &totSize, &tempSize );
+    if ( installType == Compile && removeSrcBtn->state() == QButton::On ) {
+      totSize += tempSize;
+    }
     if ( !anySelected ) {
       QMessageBox::warning( this,
                             tr( "Warning" ),
@@ -1509,6 +1517,8 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
                              QMessageBox::NoButton );
       return false;
     }
+    // AKL: 13/08/07 - skip tmp disk space checking (all files are unpucked into installation directory) ==>
+    /*
     // run script that check available disk space for temporary files
     // returns 1 in case of error
     QFileInfo fit( QDir::cleanDirPath( tempFolder->text().stripWhiteSpace() ) );
@@ -1525,7 +1535,10 @@ bool SALOME_InstallWizard::acceptData( const QString& pageTitle )
                             QMessageBox::NoButton,
                             QMessageBox::NoButton );
       return false;
-    }
+      }
+    */
+    // AKL: 13/08/07 - skip tmp disk space checking (all files are unpucked into installation directory) <==
+
     // ########## check installation scripts
     QCheckListItem* item;
     ProductsView* prodsView = modulesView;
@@ -1620,7 +1633,7 @@ bool SALOME_InstallWizard::checkSize( long* totSize, long* tempSize )
 
   if ( totSize )
     if ( installType == Compile && removeSrcBtn->state() == QButton::On )
-      tots += maxSrcTmp;
+      temps += maxSrcTmp;
     *totSize = tots;
   if ( tempSize )
     *tempSize = temps;
@@ -2588,10 +2601,12 @@ void SALOME_InstallWizard::onCancel()
 void SALOME_InstallWizard::onSelectionChanged()
 {
   const QObject* snd = sender();
-  productInfo->clear();
   QListViewItem* item = modulesView->selectedItem();
   if ( snd == prereqsView )
     item = prereqsView->selectedItem();
+  else if ( snd != modulesView )
+    return;
+  productInfo->clear();
   if ( !item )
     return;
   QCheckListItem* anItem = (QCheckListItem*)item;