[PC-BSD Commits] r17487 - pcbsd/current/src-qt4/warden-gui

svn at pcbsd.org svn at pcbsd.org
Thu Jun 28 06:38:30 PDT 2012


Author: kris
Date: 2012-06-28 13:38:29 +0000 (Thu, 28 Jun 2012)
New Revision: 17487

Modified:
   pcbsd/current/src-qt4/warden-gui/dialogwarden.cpp
   pcbsd/current/src-qt4/warden-gui/dialogwarden.h
Log:

Make jail creation windows NonModal so we can continue to work while 
creating new jails



Modified: pcbsd/current/src-qt4/warden-gui/dialogwarden.cpp
===================================================================
--- pcbsd/current/src-qt4/warden-gui/dialogwarden.cpp	2012-06-28 13:37:26 UTC (rev 17486)
+++ pcbsd/current/src-qt4/warden-gui/dialogwarden.cpp	2012-06-28 13:38:29 UTC (rev 17487)
@@ -862,7 +862,7 @@
         Now create the jail here
     *************************************************************************************************************************/
       dialogOutput = new dialogDisplayOutput();
-      dialogOutput->setModal(true);
+      dialogOutput->setModal(false);
       dialogOutput->programInit(FALSE);
       dialogOutput->setDialogCaption("Creating Jail: " + IP);
       dialogOutput->setDialogText("");
@@ -982,7 +982,7 @@
 
       // Display the import dialog output
       dialogOutput = new dialogDisplayOutput();
-      dialogOutput->setModal(true);
+      dialogOutput->setModal(false);
       dialogOutput->programInit(FALSE);
       dialogOutput->setDialogCaption("Importing Jail");
       dialogOutput->setDialogText("");
@@ -1024,69 +1024,6 @@
     refreshJails();
 }
 
-
-void dialogWarden::slotInmateInstallClicked()
-{
-      // The user wants to install an inmate
-      importFile="";
-    
-      importFile = QFileDialog::getOpenFileName(
-		    this,
-                    tr("open file dialog"),
-                    "/home",
-                    "Warden Inmate Packs (*.wit)");
-      
-      if ( importFile.isEmpty() )
-      {
-	  return;
-      }
-      
-      // Display the import dialog output
-      dialogOutput = new dialogDisplayOutput();
-      dialogOutput->setModal(true);
-      dialogOutput->programInit(FALSE);
-      dialogOutput->setDialogCaption("Installing Inmate in: " + popupip);
-      dialogOutput->setDialogText("");
-      dialogOutput->show();
-      
-      
-      loadInmateProc = new QProcess( this );
-      QString program = ProgDir + "/scripts/backend/installinmate.sh";
-      QStringList args;
-      args << popupip << importFile;
-
-      
-      // Connect the exited signal and start the process 
-      loadInmateProc->setProcessChannelMode(QProcess::MergedChannels);
-      loadInmateProc->setReadChannel(QProcess::StandardOutput);
-      connect( loadInmateProc, SIGNAL(readyReadStandardOutput ()), this, SLOT(slotReadInmateOutput() ) );
-      connect( loadInmateProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotFinishedInmateInstall() ) );
-      loadInmateProc->start(program, args);
-      
-}
-
-
-void dialogWarden::slotReadInmateOutput()
-{
-    while ( loadInmateProc->canReadLine() )
-    {
-	dialogOutput->appendDialogText(loadInmateProc->readLine());
-    }
-}
-
-
-void dialogWarden::slotFinishedInmateInstall()
-{
-    // All finished with importing a jail
-    
-    // Unhide the close button
-    dialogOutput->setCloseHide(FALSE);
-    
-       // Refresh our jail list
-    refreshJails();
-}
-
-
 void dialogWarden::slotToggleAutostartClicked()
 {
     // Change auto-start status of the jail

Modified: pcbsd/current/src-qt4/warden-gui/dialogwarden.h
===================================================================
--- pcbsd/current/src-qt4/warden-gui/dialogwarden.h	2012-06-28 13:37:26 UTC (rev 17486)
+++ pcbsd/current/src-qt4/warden-gui/dialogwarden.h	2012-06-28 13:38:29 UTC (rev 17487)
@@ -59,9 +59,6 @@
     void slotImportJailClicked();
     void slotReadImportOutput();
     void slotFinishedJailImport();
-    void slotInmateInstallClicked();
-    void slotReadInmateOutput();
-    void slotFinishedInmateInstall();
     void slotToggleAutostartClicked();
     void slotImportConfigDone(const QString &IP, const QString &Host);
     void slotCurrentJailChanged();
@@ -129,7 +126,6 @@
     QProcess *userAddProc;
     QString importFile;
     QProcess *importJailProc;
-    QProcess *loadInmateProc;
     QProcess *toggleAutoProc;
     metaWidget *pkgWidget;
     QList<QStringList> jailDetails;



More information about the Commits mailing list