Ignore:
Timestamp:
01/16/14 08:50:15 (13 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
58a4795
Parents:
0542f38
Message:

Fix up exporting jails via the warden GUI.

While here, I made the export process a bit more "chatty" so the user
knows whats going on.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/warden-gui/dialogwarden.cpp

    rbd52c24 r4efda4d  
    735735                    this, 
    736736                    tr("Choose a directory to save the finished .wdn file:"), 
    737                     "/home", 
     737                    "/root", 
    738738                    QFileDialog::ShowDirsOnly ); 
    739739     
     
    744744     
    745745      // Lauch the command output dialog 
    746     /* 
    747       dialogOutput = new dialogDisplayOutput(0, "Exporting Jail", Qt::WStyle_Customize | Qt::WShowModal); 
     746      dialogOutput = new dialogDisplayOutput(); 
     747      dialogOutput->setModal(true); 
    748748      dialogOutput->programInit(FALSE); 
    749       dialogOutput->setDialogCaption("Exporting Jail: " + popupip); 
     749      dialogOutput->setDialogCaption(tr("Exporting Jail:") + " " + popupip); 
    750750      dialogOutput->setDialogText(""); 
     751      tmp = tr("Exporting Jail:") + " " + popupip + "\n"; 
     752      dialogOutput->appendDialogText(tmp); 
    751753      dialogOutput->show(); 
    752       */ 
    753  
    754             // Launch our working dialog to prevent further action until we are finished 
    755       workingDialog = new dialogWorking(); 
    756       workingDialog->setModal(true); 
    757       workingDialog->programInit(); 
    758       tmp = tr("Exporting Jail"); 
    759       workingDialog->setDialogTitle(tmp); 
    760       tmp = tr("Exporting Jail:") + " " + popupip; 
    761       workingDialog->setDialogText(tmp); 
    762       workingDialog->show(); 
    763      
    764           // Now start the script to stop this jail 
     754     
     755      // Now start the script to stop this jail 
    765756      exportJailProc = new QProcess( this ); 
    766757      QString program = "warden"; 
     
    769760       
    770761      // Connect the exited signal and start the process  
    771       // connect( exportJailProc, SIGNAL(readyReadStdout ()), this, SLOT(slotReadDisplayOutput() ) ); 
    772       connect( exportJailProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotFinishedWorking() ) ); 
     762      connect( exportJailProc, SIGNAL(readyReadStandardOutput()), this, SLOT(slotReadExportOutput() ) ); 
     763      connect( exportJailProc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotFinishedExport() ) ); 
    773764      exportJailProc->start(program, args); 
    774765    
    775766} 
    776767 
     768void dialogWarden::slotFinishedExport() 
     769{ 
     770  dialogOutput->setCloseHide( false ); 
     771} 
    777772 
    778773void dialogWarden::slotListJailPkgs() 
     
    860855 
    861856 
    862 void dialogWarden::slotReadDisplayOutput() 
    863 { 
    864      
     857void dialogWarden::slotReadExportOutput() 
     858{ 
    865859    while ( exportJailProc->canReadLine() ) 
    866     { 
    867860        dialogOutput->appendDialogText(exportJailProc->readLine()); 
    868     } 
    869  
    870861} 
    871862 
Note: See TracChangeset for help on using the changeset viewer.