[PC-BSD Commits] r9754 - pcbsd/current/src-qt4/pc-sysinstaller

svn at pcbsd.org svn at pcbsd.org
Tue Mar 22 07:50:43 PDT 2011


Author: kris
Date: 2011-03-22 07:50:42 -0700 (Tue, 22 Mar 2011)
New Revision: 9754

Modified:
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
Log:

Don't translate AUTO-DHCP



Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2011-03-22 09:03:16 UTC (rev 9753)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2011-03-22 14:50:42 UTC (rev 9754)
@@ -192,7 +192,7 @@
 {
   // load drives
   comboSelectNic->clear();
-  comboSelectNic->addItem(tr("AUTO-DHCP"));
+  comboSelectNic->addItem("AUTO-DHCP");
   QStringList sysNics = Scripts::Backend::networkDevices();
   for (int i=0; i < sysNics.count(); ++i) {
     comboSelectNic->addItem(sysNics.at(i));
@@ -538,7 +538,7 @@
 
 void SysInstaller::slotChangedNic()
 {
-  if ( comboSelectNic->currentText() == tr("AUTO-DHCP") )
+  if ( comboSelectNic->currentText() == "AUTO-DHCP" )
   {
     lineIP->setEnabled(false);
     lineNetmask->setEnabled(false);
@@ -659,26 +659,33 @@
     tmpList << "";
     tmpList << "# Network Settings";
     tmp = comboSelectNic->currentText();
-    if ( tmp.indexOf(":") > 0 )
-      tmp.truncate(tmp.indexOf(":"));
-    tmpList << "netDev=" + tmp;
-    if ( comboSelectNic->currentText() != tr("AUTO-DHCP") )
+    if ( comboSelectNic->currentText() != "AUTO-DHCP" )
     {
+      if ( tmp.indexOf(":") > 0 )
+        tmp.truncate(tmp.indexOf(":"));
+      tmpList << "netDev=" + tmp;
       tmpList << "netIP=" + lineIP->text();
       tmpList << "netMask=" + lineNetmask->text();
       tmpList << "netNameServer=" + lineDNS->text();
       tmpList << "netDefaultRouter=" + lineDefaultRouter->text();
+    } else {
+      tmpList << "netDev=AUTO-DHCP";
     }
 
     // Setup the system nics when doing a fresh install as well
     if ( radioInstall->isChecked() ) {
-      tmpList << "netSaveDev=" + comboSelectNic->currentText();
-      if ( comboSelectNic->currentText() != tr("AUTO-DHCP") )
+      tmp = comboSelectNic->currentText();
+      if ( comboSelectNic->currentText() != "AUTO-DHCP" )
       {
+        if ( tmp.indexOf(":") > 0 )
+          tmp.truncate(tmp.indexOf(":"));
+        tmpList << "netSaveDev=" + comboSelectNic->currentText();
         tmpList << "netSaveIP=" + lineIP->text();
         tmpList << "netSaveMask=" + lineNetmask->text();
         tmpList << "netSaveNameServer=" + lineDNS->text();
         tmpList << "netSaveDefaultRouter=" + lineDefaultRouter->text();
+      } else {
+        tmpList << "netSaveDev=AUTO-DHCP";
       }
     }
   } else {



More information about the Commits mailing list