Ignore:
Timestamp:
Apr 15, 2013 10:35:21 AM (12 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.1-release, 9.2-release, releng/10.0, releng/10.0.1
Children:
9bf0d71
Parents:
90a056e
Message:
  • Number of changes to Warden GUI to work with updated backend
    • Allow IP & IPV6 address to be set during creation
    • Enable option to disable boot-strapping PKGNG / PCBSD-Utils
    • Fix up main dialog to understand new "jails" format
File:
1 edited

Legend:

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

    r0cfe72f rf66423f  
    2222    connect(lineRoot2, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    2323    connect(lineIP, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
     24    connect(lineIP6, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
     25    connect(checkIPv4, SIGNAL(clicked()), this, SLOT(slotCheckChecks())); 
     26    connect(checkIPv6, SIGNAL(clicked()), this, SLOT(slotCheckChecks())); 
    2427    connect(lineHost, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    2528    connect(lineLinuxScript, SIGNAL(textChanged ( const QString & )), this, SLOT(slotCheckComplete() ) ); 
    2629    connect(pushLinuxScript, SIGNAL(clicked()), this, SLOT(slotSelectLinuxScript()) ); 
    2730    connect(this, SIGNAL(currentIdChanged(int)), this, SLOT(slotCheckComplete()) ); 
     31} 
     32 
     33void wizardNewJail::slotCheckChecks() 
     34{ 
     35   if ( checkIPv4->isChecked() ) 
     36      lineIP->setEnabled(true); 
     37   else 
     38      lineIP->setEnabled(false); 
     39 
     40   if ( checkIPv6->isChecked() ) 
     41      lineIP6->setEnabled(true); 
     42   else 
     43      lineIP6->setEnabled(false); 
     44 
     45   slotCheckComplete(); 
    2846} 
    2947 
     
    3654void wizardNewJail::accept() 
    3755{ 
     56    QString ip4, ip6; 
     57    if ( checkIPv4->isChecked() ) 
     58       ip4 = lineIP->text(); 
     59    if ( checkIPv6->isChecked() ) 
     60       ip6 = lineIP6->text(); 
    3861     
    39     emit create(lineIP->text(), lineHost->text(), radioTraditionalJail->isChecked(), 
     62    emit create(ip4, ip6, lineHost->text(), radioTraditionalJail->isChecked(), checkPCBSDUtils->isChecked(), 
    4063                lineRoot->text(), checkSystemSource->isChecked(), checkPortsTree->isChecked(), 
    4164                checkAutostart->isChecked(), radioLinuxJail->isChecked(), lineLinuxScript->text()); 
     
    6689     case Page_IP: 
    6790         // Make sure items are not empty 
    68          if ( lineIP->text().isEmpty() ) { 
     91         if ( checkIPv4->isChecked() && lineIP->text().isEmpty() ) { 
     92            button(QWizard::NextButton)->setEnabled(false); 
     93            return false; 
     94         } 
     95         if ( checkIPv6->isChecked() && lineIP6->text().isEmpty() ) { 
    6996            button(QWizard::NextButton)->setEnabled(false); 
    7097            return false; 
Note: See TracChangeset for help on using the changeset viewer.