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

svn at pcbsd.org svn at pcbsd.org
Tue Jul 3 10:58:14 PDT 2012


Author: kris
Date: 2012-07-03 17:58:14 +0000 (Tue, 03 Jul 2012)
New Revision: 17608

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

Fix some bugs exporting / importing jails
Don't enable terminal buttion unless jail is running



Modified: pcbsd/current/src-qt4/warden-gui/dialogwarden.cpp
===================================================================
--- pcbsd/current/src-qt4/warden-gui/dialogwarden.cpp	2012-07-03 17:55:57 UTC (rev 17607)
+++ pcbsd/current/src-qt4/warden-gui/dialogwarden.cpp	2012-07-03 17:58:14 UTC (rev 17608)
@@ -566,7 +566,9 @@
 		if ( running ) {
 		  pushStart->setEnabled(false);
 		  pushStop->setEnabled(true);
+		  pushTerminal->setEnabled(true);
 		} else {
+		  pushTerminal->setEnabled(false);
 		  pushStart->setEnabled(true);
 		  pushStop->setEnabled(false);
 		}
@@ -713,9 +715,9 @@
     
           // Now start the script to stop this jail
       exportJailProc = new QProcess( this );
-      QString program = ProgDir + "/scripts/backend/exportjail.sh";
+      QString program = "warden";
       QStringList args;
-      args << popupip << exportFile;
+      args << "export" << popupip << "--dir=" + exportFile;
       
       // Connect the exited signal and start the process 
       // connect( exportJailProc, SIGNAL(readyReadStdout ()), this, SLOT(slotReadDisplayOutput() ) );
@@ -989,9 +991,9 @@
       dialogOutput->show();
 
       importJailProc = new QProcess( this );
-      QString program = ProgDir + "/scripts/backend/importjail.sh";
+      QString program = "warden";
       QStringList args;
-      args << importFile << IP << Host;
+      args << "import" << importFile << IP << Host;
 
       
       // Connect the exited signal and start the process 
@@ -1206,10 +1208,14 @@
    pushStart->setEnabled(false);
    pushStop->setEnabled(false);
 
-   if ( listJails->currentItem()->text(3) == "Running" )
+   if ( listJails->currentItem()->text(3) == "Running" ) {
      pushStop->setEnabled(true);
-   if ( listJails->currentItem()->text(3) == "Not Running" )
+     pushTerminal->setEnabled(true);
+   }
+   if ( listJails->currentItem()->text(3) == "Not Running" ) {
      pushStart->setEnabled(true);
+     pushTerminal->setEnabled(false);
+   }
 
    groupJailTab->setTitle(tr("Working on jail:") + " " + listJails->currentItem()->text(0));
    groupJailTab->setEnabled(true);



More information about the Commits mailing list