[PC-BSD Commits] r123 - in pcbsd/trunk: ethernetconfig/src wificonfig

svn at pcbsd.org svn at pcbsd.org
Thu Mar 8 10:20:23 PST 2007


Author: kris
Date: 2007-03-08 19:20:23 +0100 (Thu, 08 Mar 2007)
New Revision: 123

Modified:
   pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.cpp
   pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.h
   pcbsd/trunk/ethernetconfig/src/ethernetconfigwidgetbase.ui
   pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui
   pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h
Log:
Changed startup routines to load as *fast* as possible

Modified: pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.cpp
===================================================================
--- pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.cpp	2007-03-08 18:18:52 UTC (rev 122)
+++ pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.cpp	2007-03-08 18:20:23 UTC (rev 123)
@@ -285,95 +285,18 @@
 
 void ethernetconfigWidget::setDevice(QString Device)
 {
-   QString tmp, tmp2;
+   
    DeviceName = Device;
 
 
-
    this->setCaption(DeviceName + " " + tr("configuration") );
 
-   // Start loading the device information
-   tmp = getValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 );
+   // Connect the slot to load the values
+   QTimer::singleShot(100,  this,  SLOT(slotFinishLoad()));
 
+   
+  
 
-   if ( tmp.isEmpty() ) 
-   {
-	checkDisableNetwork->setChecked(TRUE);
-	tabMainWidget->setEnabled(FALSE);
-   } else if ( tmp.find("DHCP") != -1 )
-   {
-      checkDHCP->setChecked(TRUE);
-      lineNetmask->setText("255.255.255.0");
-      slotIPCheckbox();
-
-      // Look for the mac address change
-	if ( tmp.find("ether") != -1 ) {
-		tmp2 = tmp;
-		tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
-		//if ( tmp.find(" ") != -1 ) {
-		//  tmp2.truncate(tmp.find(" ") );
-		//}
-		lineMAC->setText(tmp2);
-		checkMAC->setChecked(FALSE);
-		groupMAC->setEnabled(TRUE);
-	} 
-
-   } else {
-      	if ( tmp.find("inet") == 0)
-	{
-	        // Get the IP address first
-		tmp2 = tmp;
-		tmp2 = tmp2.remove(0, tmp.find("inet") + 5 );
-		//tmp2 = tmp2.remove(0, tmp.find(" ") );
-		tmp2.truncate(tmp.find("netmask") -1 );
-		lineIP->setText(tmp2);
-
-		// Look for the netmask
-		if ( tmp.find("netmask") != -1 ) {
-			tmp2 = tmp;
-			tmp2.simplifyWhiteSpace();
-			tmp2 = tmp2.remove(0, tmp.find("netmask") + 8 );
-  			if ( tmp.find("ether") != -1 ) {
-			tmp2.truncate(tmp.find("ether") );
-			}
-			lineNetmask->setText(tmp2);
-		} else {
-		   lineNetmask->setText("255.255.255.0");
-		}
-
-		// Look for the mac address change
-		if ( tmp.find("ether") != -1 ) {
-			tmp2 = tmp;
-			tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
-			//if ( tmp.find(" ") != -1 ) {
-			//  tmp2.truncate(tmp.find(" ") );
-			//}
-			lineMAC->setText(tmp2);
-			checkMAC->setChecked(FALSE);
-			groupMAC->setEnabled(TRUE);
-		} 
-
-	}
-
-
-   }
-
-
-  // Check for the IPv6 Configuration
-  // Start loading the device information
-   tmp = getValue( "/etc/rc.conf", "ipv6_ifconfig_" + DeviceName + "=", 1 );
-   if ( tmp.isEmpty() ) {
-        checkIPv6Enable->setChecked(TRUE);
-   } else {
-	checkIPv6Enable->setChecked(FALSE);
-	lineIPv6Address->setText(tmp);
-   }
-
-  slotIPv6clicked();
-
-  // Starts grabbing information for the info tab
-  loadInfo();
-
 }
 
 void ethernetconfigWidget::runCommand( QString command )
@@ -555,7 +478,7 @@
 
 QString ethernetconfigWidget::getInPacketsForIdent(QString ident)
 {
-        QString command = "netstat -I " +ident + " | grep \"Link\"";
+        QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -570,7 +493,7 @@
 
 QString ethernetconfigWidget::getInErrorsForIdent(QString ident)
 {
-        QString command = "netstat -I " +ident + " | grep \"Link\"";
+        QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -584,7 +507,7 @@
 
 QString ethernetconfigWidget::getOutPacketsForIdent(QString ident)
 {
-        QString command = "netstat -I " +ident + " | grep \"Link\"";
+        QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -598,7 +521,7 @@
 
 QString ethernetconfigWidget::getOutErrorsForIdent(QString ident)
 {
-        QString command = "netstat -I " +ident + " | grep \"Link\"";
+        QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -673,29 +596,96 @@
 	tabMainWidget->showPage( tabMainWidget->page(3) );
 }
 
+void ethernetconfigWidget::slotFinishLoad()
+{
 
 
+   QString tmp, tmp2;
+   // Start loading the device information
+   tmp = getValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 );
 
 
+   if ( tmp.isEmpty() ) 
+   {
+	checkDisableNetwork->setChecked(TRUE);
+	tabMainWidget->setEnabled(FALSE);
+   } else if ( tmp.find("DHCP") != -1 )
+   {
+      checkDHCP->setChecked(TRUE);
+      lineNetmask->setText("255.255.255.0");
+      slotIPCheckbox();
 
+      // Look for the mac address change
+	if ( tmp.find("ether") != -1 ) {
+		tmp2 = tmp;
+		tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
+		//if ( tmp.find(" ") != -1 ) {
+		//  tmp2.truncate(tmp.find(" ") );
+		//}
+		lineMAC->setText(tmp2);
+		checkMAC->setChecked(FALSE);
+		groupMAC->setEnabled(TRUE);
+	} 
 
+   } else {
+      	if ( tmp.find("inet") == 0)
+	{
+	        // Get the IP address first
+		tmp2 = tmp;
+		tmp2 = tmp2.remove(0, tmp.find("inet") + 5 );
+		//tmp2 = tmp2.remove(0, tmp.find(" ") );
+		tmp2.truncate(tmp.find("netmask") -1 );
+		lineIP->setText(tmp2);
 
+		// Look for the netmask
+		if ( tmp.find("netmask") != -1 ) {
+			tmp2 = tmp;
+			tmp2.simplifyWhiteSpace();
+			tmp2 = tmp2.remove(0, tmp.find("netmask") + 8 );
+  			if ( tmp.find("ether") != -1 ) {
+			tmp2.truncate(tmp.find("ether") );
+			}
+			lineNetmask->setText(tmp2);
+		} else {
+		   lineNetmask->setText("255.255.255.0");
+		}
 
+		// Look for the mac address change
+		if ( tmp.find("ether") != -1 ) {
+			tmp2 = tmp;
+			tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
+			//if ( tmp.find(" ") != -1 ) {
+			//  tmp2.truncate(tmp.find(" ") );
+			//}
+			lineMAC->setText(tmp2);
+			checkMAC->setChecked(FALSE);
+			groupMAC->setEnabled(TRUE);
+		} 
 
+	}
 
 
+   }
 
 
+  // Check for the IPv6 Configuration
+  // Start loading the device information
+   tmp = getValue( "/etc/rc.conf", "ipv6_ifconfig_" + DeviceName + "=", 1 );
+   if ( tmp.isEmpty() ) {
+        checkIPv6Enable->setChecked(TRUE);
+   } else {
+	checkIPv6Enable->setChecked(FALSE);
+	lineIPv6Address->setText(tmp);
+   }
 
+  slotIPv6clicked();
 
+  // Starts grabbing information for the info tab
+  loadInfo();
 
 
+}
 
 
-
-
-
-
-
 #include "ethernetconfigwidget.moc"
 

Modified: pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.h
===================================================================
--- pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.h	2007-03-08 18:18:52 UTC (rev 122)
+++ pcbsd/trunk/ethernetconfig/src/ethernetconfigwidget.h	2007-03-08 18:20:23 UTC (rev 123)
@@ -84,6 +84,8 @@
     
 private slots:
     virtual void loadInfo();
+private slots:
+    virtual void slotFinishLoad();
 };
 
 #endif

Modified: pcbsd/trunk/ethernetconfig/src/ethernetconfigwidgetbase.ui
===================================================================
--- pcbsd/trunk/ethernetconfig/src/ethernetconfigwidgetbase.ui	2007-03-08 18:18:52 UTC (rev 122)
+++ pcbsd/trunk/ethernetconfig/src/ethernetconfigwidgetbase.ui	2007-03-08 18:20:23 UTC (rev 123)
@@ -601,7 +601,7 @@
 </widget>
 <images>
     <image name="image0">
-        <data format="PNG" length="5241">89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de0000144049444154789ce59b5f685b599ee73f596cb8820a48d00609262041054a2601cb3850f2743dd8cc43b5f366330f6b330d2b31036b510b3df634f438c5b0ebf4438d9d816eac862c562083550fd5761a32b21b02562de991aa896dd938b15c388dd4388564ec4257d88b74b10ddf7db857f29fc495744f17359bbe70f9fae8fade7bceef7ccff7f73bbf73ee2549fc391fffe5bbaec0777dbc5d0630114514ff795c7c8112bf48885534f9cf9317d2fced328007e6d7e6891dc7882fc5891225f145028e2fbee5ed3240196e76dd24de1267f0ea2073be39a237a2d072f12d6f97017c0e035a622456130cd407483e4d122376f13d92de9e735b52499a4e4c4bebd24c62465a97a67e36a58beeb9f496b941a57f9da6b7dc4bb225c91043ccb5cc31f0f500fc0f2ebdfa8eefbad7fe84e7466e43da95669233d296349b9c95b6a4a9f8c50cf8ce2bfd1f3df911e22364fc0869575a7cb42825a5d9cf66a582947a9092e2facf69007e844822f727c84823ef5de4cd216f1279b790ff21f297907f01f92b289846c17d1ba7f651f0310ad550e831f2e7d1d4c2845491661fcc4adb4ee3b7a5e9bbd3171ae08fd6804b7f7f49b480d70!
 b560bb8dd60011e0fd005c697607581f10c0883b10a84c0780a5c07d72610049e43fd2ab81ab809f520f014acebf67d56085802ab038c35b0ae016b4e79d946fe0df23d35b25faed2fd6e37f36bf3dcecba497a2d4def8b5ef8bb37d08070164dd750f809ea11eac9a394505f012d0a0d96504668b082368486f7d18a50a48115e7faae8325fbbefeed134c09f5179ce76ea1940cf56d1936e6dd36aebbd52314cea119d9f5090b85b368fa1085b2273d3fe530a2c9809a945a484925697161d1d684c4cceb19d0bb79499d4130802890c0ee51803ae03a827a2bb8ea6e622e88d70d0c9701072e6297217160605d06e3c04df4b245d2f46079ea60ba8879eac4f75cd006ec1944db4c126517555f1d5e40fd4a158a0656a00acfa17ab58ef97407ebba45e06990c9eb2112450302069e171e6257a224cb0b0cf962cc95130cf8a22497e20cbd1723fb2c4bf7bbdd76cf77f5da58ec85c86b18302b34fe20a29eeff7c8eff7cbfb175e0d7fd22fa9a615cde8f4b1a194f3978d1b878b76f1d0f9f93073aebc72a63c5eea5349b31ad9ee5141610d17c25ad1b4225b216514d460deaf59190a3f4115ad6863df79debe0d2be7cb15a7fcd87ec7e2a345a922296dffcfccfd3760c0cdcd4b9a0f8ae4bd249ffef2530066c2d394ffc6a43dd00e9880873a26ae576219173e4cca78c!
 e60110f8126e6ea691eb8eec00b885e3189170deacd9eb76013ac601d73758!
 7ea358bf
eaf22dc0a24489627e9f70d70e7f96dacabc0a6453958c558859d9049ef17fdc43a46c93dcb91fe3c8dcfeb63e8af8728ef94f1fdc6073f7c0d037a8466d213aaa56b1aff9fe3aa3c2c6926397da6e755dbb071db61c0fab47458931e8d4bbb25e9c1b0542b29559b9054d3ecfeb8a482a62bc392569a0c18dbee53413d1a29f46843331ade0a6945210de6835a945ffdeb7e8565289cb519a07d29a3d099311faca0e023db3bf81750ad56d2e2639b89633f1953a823a4c87f8b4872bcc29b68403aa8664f96c9e2a39b3cf3b473931c7374feeba7f0cb07f6ecaa855762b92784efc7611226443d16f13d88b4d938da9624579fc7e3ba43e20598572c780e96d3f3d5a0054feb58d72dcca52ad6358bfe1d9b0143ab9dacbebb0acb50ef005703d7a07e0d62bf1f67b4e316f92ff3b46f7eccdc6fd3dc590a32f92f9374bfdb0d6daf66407332140b02cce3c207808f6e38dd7806ec7f6c4c2d2f405fc82261ba887a624ee3a3c4cb106d8bc21174ba6e9228ba885e89c173883a8d8f06a3184f21761d5835887658b006b1408cdc4196682806cb40a3f15d348dc11a443ba2b00ceda176e62d3703efd975ea6eb105f1a2e3420614c912a09b3c69dae9b58df06201fe290d6e0f1886dd68c300b787c4338bc46f72d0625035c0ebf790f87990e4d716848032dcf2cd913b98e7!
 d3cb77a00866a08af1dca07ab5da1cfbac8219b2a87eb183d501835f45b87535c1c05227b977575feaf9463c30d260c0eff2b42ffd94f8bf2f90dc0c32fd8b69dafdede079030dd8d0ecd931af8cdee8a8d830f1c98466de9f51f8fdb0c25d618ddd1f5641298d6ff7aba24569db1ea3235b3dda5058c35bb6fa0fae07b5a8a0fa737ea5e455cf1377d3cf971c0d5854e8cc98f7efdae82d21ef434703b2f6f3c73f1e57f8fdb0467e3422c989085fab014f2f297dfd3403d204e86daa7c43c5cbe4f1d14e991c3e3ac91f65696fed26ff34cfc2af17d87cb689756c4710810f0d085689dd8007ab16b1bf5b206f41fc4908be7263393d6f8f7db0aed76109cc6b3b0453bd7004bd817e86c2516efd7c94c4d777f07c70b6e71b91e0c85736038abf2f12580a906e4bd3fb835eccb289e7d803575ea301d1eb00734d0d08d00b800b0f90c34300ea097cb493aec7f11164eee036edad419207b7f0b45854dd45267f728be08701923f4de20bf888dd8891780191500480f663702d1b44af469db18f33f6edc6d73b2c8cdfba9974cf10f85d98be6a3fb7fef116fdc6201c9f8c79abc3d6800646bba2b0068160006e40ef0f7ae139787c1ee6d7e6df40031c0634fc7763ec3718903d4ad0dd1a255d8fd3ebaa335f879bae28730771062e5b244d8b214f9dc41e44db5c948f62f8!
 5a03dc7e318475c5c2bd64323afc39450b92b97ef8ca4d346091280201038a!
 100d58c4
9f1b9857abb4ff4b2f7d3b7ddcdeb98df18e81abc545e29d3bb83f38370770706cc7664079a78c2fe0a3f8bc48e06a80f28b32be161ff85ea30161a195731a703ec2cbd49c88b066c7078bfb36a6f6a724d534bd3b2269c34129559956498b1a2bf4ab76d82375215d43da725ed0882b6acefbf69d88b124d51ed734f6933165ee6434fcd1b036121bf27e7c32e6bddbc8fb00b90bc8fd19aa1d569a1aa09f4d49352993cb4887156941176ac0890172387a5638d3f89aa3701595ce946b4eb972068735b53b2c6958a543fb39e3dbfd2aa84f134f6c0394aed9ef59acd8c65edcb58d9a7270667b4a35953475674a23ff30a2c8df4434fcdf8735f2d188dc3fb1a7c8a71beffd0cb99368223b2e1d4aa54249faa4a652da16f0f1ec88b4fb06069811d2e1d998ffa5d8bef9fbcab9eb364ced0eaba6154d951a0c987218d0a7826635f530a44a21a8482eac8ca6d59fb3d5bfef895fb3875ef53cf62ab88fc20b6e55162a1afe6858993b198d7c34a295bb2b727ffc72cfbb0bb6012a871529ebd4675b4d2649d2627af142033435a07bf592b22135d53e7f344f7bebcd535ec0d686f983496e5eb6983361c0132569c619f2dcc6a48cc12dee950d623e281f8de26b0d70ab388015b0233ef3aa099b0656b0eaa8be65ab7e471d96a17aad8af5db2af50e18fde5143123463690a!
 5bbdccde8f22889963b18e1531a7004b4da381e1867b4cbd1802b3e5bfd7d1eea661d17aed7c70161a1cc39066c1ca65ed1d335cd56c625553453199354688ee1a9528301c30eada754504a235b7dda508f86f33dca684683eb212d2aa4fe2741a50efdeac9fa15ae79154a1b67fc7cf0a15bd325afc20f820ae5fdf2265eee79f7968db5c38a169f2c9ee97987faf6acf0b50c58baa4ec8d1306e48ee6e93cc300fbf7b98349062e479933e30c782c127b16d1b649cca33289d65bf00262570caa0e03469fdfa47eb5ee447ab6bfaf5eb76015ac6b262c83d961c13294dfdb7929c23baff6e77bde00ac63180f4e30da318af9b5ddf3e69e89a7cd43fdc061c0e5d730605a4887e7677f8df9fee9f97dc5614049d3bb3603366af6f589ed882aca6862db664063be9ea9384c6a0a9f8da992cdb8d9d289009ec6e9c239dcb231b53d7b068dfb8e063cd1590638116ae671e642069c0c812767bdc0caa1fdf0132f60ff3e5b999034a619a7f10d97573a2ca8a2418d6f4734a148d30b941c575738871b355b481baeaf91d4782deebe8c46024d6427a443a95272eabbeb78abfd5aa323bed900a143b4583bcb801587018d31ded4827dbbc71a7e5f35fb7fa61f8f4bfb154d3f3ac9cd65128b1acb4654d28ac6b622aa6843e35bc376391f5141190de7fab5a294224ffa94394c6!
 9307b0a6b290d3e3ec1c5fd94fad336ce16ec7a18095b03324f1ca69e63801!
 e5f6c80a
606747e7149b9b09ab17efdc79db8ae85a8ff70d2d680a3229ed6c049a6e7a88ca7f50ef132c47c934cfef324a3df1bb55764aa434c5a93589645fc5777e87e18c05d7553bd5e75b2bbf69837afd561d9a2fcdece1f3ce60dc0fca1c8ee65f9cb5ffd2513d72718edfac335e0241fd005d4e3f86807c0f574159e6de2c243be9ec6d31a803a78f0c111785a7dc4cb10f145c896d30c0406187d364ab01a64e8b743f47daf0fcf3b1e7c5e1fac1944af476109224ee322a75cdfab62fb26763915ec701a1fb28b5608e29b71badbba8193b980c7e7813278da3c6082ebb28bec72f695fa77c600f165c015a37c94b77f709694eb98b4bb7a993327c15526b9771b5ac13c2a13f1d5b9f7224eb7af97e46692b1ef8d91f832613f6f2d4ee43882cfe3c5fbbe8f85cd349337027cfe65107f38c0c2b3768c2e703f73e3e9f2e27be6c5f3fe59f439e8fec0468e0d8c25ec3cc412c48231b27b593886c45a023aa0fca20c3e30f74cf040fda04e7757f7850638d1801a5adc9f3a11800f91fe21ec68404a524533bbb6fa37fdfeb6edf7554aa9b250d1c44f27b471774383ff75501b890d4d7c32a14c3c23ada7ce08de4bd9dccab9b2e3bf1b42d72867ce974b7699bba8a6da491cd08804df200e38d91fb006bd975fcd005c3799db4b30d46691d88b83cb6640fd0ac45f24c07793f8!
 521c0b8bf85a1c807b6bf700b8b37c07deeb25bd3747fbe54eb2661a2e43ba3c47a7a79bf9f29cbdb3c329e7cc2cb4416e2f4b675b37b9bd9372775bb7dde36d90ddcbd2edeb6e3220be14a7b7a3d766c01530cb26b4394ce8b898004d4b4cd57066752f336065df6680edf74ba7fcfeb02a5a51a69452e961e9950c087f1252df83905287d3ea7b1c5478df2fff8221b62492120f256fd27f618467e491711f19ebc89b74cbbbe59537e99537ef95f7be8d0d0634e38082838db9c0a337980b74fee692721fd4281f15f1b5b653be3780ef075e4cdf6d3c78983713dcf4f49128c789fa6e631e95a1f516f122dc0a24b8fdbf6e133d8e123f8e63fe5f13578b8b584b8cde2fba09fcab07d78e8179cda4faef3b981d163b9f3b6b92bf03b73f80e1fafd856a6f390957eb188c16b02c5eca464f842718bd366a6784ae062817edbc805936f1b4782ecc0a372d11dc47a9ca2906485a74fc7dc3ff4f979cd8df19c3e385e166ceae96add9ebf28593a5e9d9cf66e5edf0aae741503db5a0fc0b46733e7f9a01eefbfe6fec792381c821ee5e8c35d54ef2018d7c438309df900f38a301373d758a473900d26682decb43e4ebd9a6ea477d16f11771b80ce5a332042c12cfed72b56387a1c1218ade3c9d7ffd80d8d703a43ffc94ee7f0c607ddfa4f87f8a581d168693da66c979ef!
 aab306b9ece092d3d3a7d4de3a7656979df2abf0deea3d7abb7a296e16e12a!
 149f1721
00e562f91b35e0240ee880391302ad9d00f47aa2cced4dd2ee0a923bc8da7eff8541ec4a8cfc41165fabcfc9eb47c99a697cae00c9729c80ab9df85318bad1cfceb332c5bf2a525ede69063f0dffce0de7c5219be6aff2f32f618b73df2b30128ac0b29d13cc3fcd13b81a80e7e00bf8985f7e839c60fbe79794efa9503c2a1268edc4c43c35f6a39847658c568b7b2fe2c4ae4c523e2ada1af0dce0f6d504e57a119fcb4bb15e64d2f5313b5f14c9bdbb09cb1681ef07097c19a07aadde9cef5bcb51ac8e08e6af7f0a1f2471ad5998f52ad6b1f54663fe3c4e7d3045ecdd98bd32146a27ff344ffbf5768a9b4502ef042ecc0a9f684005cdee4e9c19f327b1bf0d53db23aa69a3591edbb263f9861f6fcce2fa1e07edbcfd433b8737911fb3bdc91fe8e7179d7584d9823d319bd9b235696add7ecf446e42259534f6c47e7e530372366cacdb13af6f5a1b6cfed1ffd89034a19a93e8ac55ec9715761d61aca4248d68d14977552a2949839ade1a9424952a1949c35ad94d2954f136172dfc0f5145a566e31b53dbf353da8631327f2c9632524d5a79622fc26ee49c59676ea32186df6c804c0da9e630a0666779b56d677e6c2c48fb8e172838abbd9588a41e29e797f691d60d69df900a6e496e69dbc19c573af42bb5ee6eaafc456aef5e37cef8f95021a4d08390a60bd3ea7!
 9d8a3d46e4a7d0b7d4aeda614791cd1cafe8a228f232a1c1634bd306d1b21ebac443b71c1ec676fb03a3cf41b97921f94e0e801b446c19c044f140e1270b90a45205086832a5c2ec252196e58ceb6010bbe00c29ca069808797ae077e65b07350b5c7f6b985d53f64ccbf0a878d61860243747775935bcbd1d9d569e3f34e187c8d06646a48fb7e497e693f242928e5827679dd2b1d1ad2bed3a3ebc6abcb5b6ee910a9e4fcdeb89e77ae6fbb35b33b25fe9657f6083f433c41fc0c9145c49df2693cedff13677138397c666748e6b13d2c669217ef1069fe319835eccad69c4a179cc6ecba2519d293d3d72f2a9fc2c673ce5d0f2f84c45fbdda00ffe1f3fec9f6984c3a736284fb6faa01874ea50f9d4ae78c931ed4a9eb1795b79dc6574e3fc72d159cebbb6e857743e2c36fc70033c99993cd9215498f6c09fba63d42cd3f7a1e19aac8d0f496ddf854c16ecc86c3804ac131861ce36c9d2baf1b67b179edecf5f0c2b76700dd97520fcf6e915b7cb42825de8001af3b8d1c32ee22f73a0a3f40a16d34f8c8d062058d640d6d1c1a1acfd9469c718c97690c9f9263947dafa6b6fddf4ee32566eecfd83b441d2334703a71f14ed16fa52217be2cfe2df57ce34c38414fe1649b6cea614abafb2760c0ff0fe74cc2d925de988d3ac6f856f60affa73cfe379a7b678e81e301f!
 b3b0106986b9d63a07cf1f7026fd5273309120c5c1f204992819083d706881!
 3bff09eb
78b01bf40092341f438dafc62a4b14ef167c380e88d28b7bfbe4ddf953e267726e9f3f5113ffe7361c0cf51d26df7f8edaf6fdbdf0db6d8df0d1aef188cfe78f465167cd7cafd273fb34eecdff862a4243b27787e96e86c9bf9ee2bfc2d9dd377a7a5b8e30213ce47130d4c3a1f54bd756ef08f38de2a11fc638eff0761a4e68f8a4e1edf0000000049454e44ae426082</data>
+        <data format="PNG" length="5167">89504e470d0a1a0a0000000d4948445200000040000000400806000000aa6971de000013f649444154789ce59b6f685b597ac67f29365cc104245883040d48d0c0c84c20323644de1d589b16b649fbc5a61f6ad385dab4508b296ced5dd83af3a175f6c3acedc22cd6428ab590624d616a7b4b6abb9056dae2a91563c7ca90c4727116697106c9d883ae7116e962079e7e3857f29fc44966bbc36cb3172e8f8f8eefd539ef79cef3bee73d47e724f1db7cfdce57dd80affa7ab30c60239ea0f88fe26215257e9c100fd1d80fc7cea4f99b65001fccdf9b27f62c46fc6e9c7efa497c928067673ff26619a004d7ae5c23de10a72fdcc74c6086fe683f349cfdc89b658080cb808618f1d538ddd56e92f7930c3174f63392de9c7b4bd28e3499989472d254624aca49131f4ee8ac67cebd616e50e97f4fd359ea24d990a4975e661a66e8febc1bfe9a732f7ee2ab1eb55fe3bd9e5d97cad254724aca4bd3c969292f4dc4cf66c057dee8ffebcd7710ef21eb3b48652975272525a5e98fa7a52d696e764e8aeb37d3007c07f131f27e80ac45e4bf89fc0f903f89fc7914bc8d823b28b88082fb289c46e18ac1c90a0a2fa2c8018a2ca2e0269a581895f6a5e9d969a9e876be284dde9c3cd300bfb2069cfb9b73a201fc7e701ac0e!
 b0507f0f9802b603d02e70a589f0251b0ee0311b01e0297c0b3018481c750bd089e1a6e40350c3c04e79279ce8900abe0b481b50ace65e01e38ad602d1be4a790fb03917994a1fded76e6efcd73edca35d2f7d2743ee984bf7c0d0d8866d0d4018aaea00ea18e1c4a095dcda325a19e225a13ea29a3bcd0c03e5a17eaab61d9addf71b1689eebda3ac2945057de7def264ac9d2d54dcb60ce6bf081571d42d12c9a96694f54289a41534291ccd1c84fba8ca833e0409a5b989376a4d442ca684262ead50ce8dc38a7963058400c88634614a00a780ea1da089eaa97410f8c572d2c8f054f3d0c9e87f8530be73c584fbdc4ce3b246c1f8eaf0ab687415f95f15d0f3401bb16b1269b78c9c35ea00a4fa07a610f0a164e680f1ec3dec52af6c36d9c4b0ea18761262e4588172c0859f89ef8885d88912ccdd21b8831534ad01de827b91aa7f79d18994f0d03d2f7d2745ee93458e884be5730604e6864b64f1ddfe850301894ff77fd1af8a04b92b4a6291dbfd635e7fe6570fd20658a07eec7074ba7ca6b27ca23c5ab2a6b4e835b1d2a2aaa817c54eb9a52df66446b0aab2717d49c2c45575045eb5adf77dfb76f60ed74b9ec96170da4eea44c5d5a52459abaf51a0cb8b6714ef36191fc49928ffee52300a6a35314feac4473a819b0011f556c3c2fc4121e02d894f09dc0023!
 e4275cc56d3cc7ac6e109c42ed88c172caaf5917760039c7015fbfe367b118!
 7ae421fd
7430992a5317a03bddc787c1de722b0e1500aef61dd87ed884de7dd2e62ad43643fcd92fe599a803f40ef9ff652faac44e093007cfb150ce8109a4a8f4a8bd2c8df8da8b250d65472f2c4c8abb26e70cb65c003b7fece88542e4bb303d2415973955149d2f4fe88a4a226cb0392d6eb0c18debaaaa23a3498ef505ed31ad88c685d11f5e4c25a52505d0f828aca52346318a07d694d9113733ebc8fc2778c77082e201d94955a344c1cfefeb0229723eafbf33ed38ed9e95733a073e39cd261d547b2448600ede498a7996b6499a1e59f3e827f9935abab065e88a58e0881ef4549d8d0ef7388ef42acc9616c17869a9264abf3043ce3c49f807dc181c7e0b823bf1776e06115e79283bdba8773d9a1eb33c380defb2ddc7ffb3e2c43b5153c35bc07d5cb10fbf90843add7c93dcad1bcf13e33cb69c657c38cfdc318ed6fb783efc50ca82f8606c300f378080010a01d8e779e6ef38fb5a5e51918687348d81efa7d436ee7638c950c72082d9e6bc40b1e621706e131c4dccec7c231ac87307809b86f116b73e01e0c8606c93ecd108b0cc23250ebfc15eac6e01ec45a63b00ccd9166e61d2fddef9836b55b4610cfbace6440810c21dac991a6994e6384d2020ca7c1eb03cb329db62cf0fa483c72487c9285068b3d0bfc411fc91f87496c3b10014a703d3043f6e93c1f9d1f87!
 02d8a13dacc7167b17f7ea739ffb60471cf6ee6ee3b442cf2ffab87e3141f76a0bd9b7ef3f37f2b57860b0c680ffc9d1bcfa03e2ffbd407223cce48f2769febd6638ff1a1ab0aee993735e4b7aadab6c60f483514d5f9956f44a54d1d6a8866f0da8a89446b6ba54d192b465e6e8e06687f28a6a60d3a87fcf83b09614565736a894fcea58f1d6fd7cd9d58025454eccf960d9a07f07f96fbb1a9031ef1f797f44d12b510d7e6750921b11be52031e9e53fad27106a409d15957f99a8a97c811a099125902b4903bccd0dcd84eee618e857f5f60e3d106ce33134184be6541788fc136f8e8be43ec2f17c83910cf46e0175e1c77e4cddc07e7521556c1bebc4df85f3be1103a435df446fbb9fea321129f8fe37bf7e4c8d722c1c15f1806147e5e20b41a22dd94a6f30f3bb14b363e7c10780503a685f41c036a97ebc72b46f5539589632a5fd1d4feb0ca9beb1abe39a0ca665123b786a52d69627158652d6964ab4bd29cd48af4361a5c8c6a5dd3eacb45b4a688cb80a0aeae04d521bf3ad27e55d215e38dee5434fcfd61ad27d6e5fffef323ef2f22ff2caaa82c65dce6e65cdc343077fb0b30a0e6bf6b73bfc680cc6182f6c67ed2d5389d9e2af355b8e68931f3749ceef30e49dba1d75725b10bfd4d1e4a8731028d216e3ce9c5b9e0e05db5191af8190507920fbba0e025!
 167288178090050588851cc61f5bd817f768fe874ebab6bbb8be7d1deb2d0b!
 4f8387c4
5be378df3db5067071f833c380d2672502a10085c705421743949e94085801687a0503a2426ba718703ac25baa4c9d64c2bec1b97dc388c99d41497917a5b9f2a4ca5ad270be4b528761c03bd447a61e5754dcefdb779956949431fe7cedc3350dbc37a0fcadbcfcef3f3ff2de2de4fd184995ba06e8c309e9405aca2e99972fe84c061c19208b24a9acfc89ce575c852bab78a25c71cbe51338a0899d0149032a1e98f78c6c75a9a8ab1a5d310628be63be275536c64eed18a3ceb938b53521a9ac89f1090d7e77507d7fd6a781bf1ad0e07b83f27edf2c918f77deff31f226d16866c4d82e5f943e908a6923e02399c19a48bfdc00d3423a3819f33f17dbd73f5f3b556fc0747e5d13c51a03265c065c5551739ab81d51652bacbe6c546b9a5257d6a8ffd595a0e6e457c7a25fe10a8a2e7855b953d1c07b035afb704d83ef0d6a3db12eeffbcf8fbc77cb18a0a2ca91066cb968c646a974ea4c03d435a0fdfe396522aaab7dee709ee6c66bc7bc80d186f9a7635c3bef306343b72f46d21ea7d777c3adbf4ebc64110b40e97088406388eb856e9c9089f8ec8b366c5838e13d57f51da3fa6d55b80b7b97f770fe7b8f6a2b0cfdf304312b462694a1bdd4ced0bd21120de358d1631a7008341a1c098d3014bd6ee6fc858051ff808faa5dc5d3e079751c10155a3ac580f583b91!
 78ef474d955fff2b031b33b87278a35060cb8b49e5051290d6e5e555e1d1ac875684dd3ea7910d19222ea5a092ba5a03a3241450ffc8aa4ad137e3e7cdbaba91dbfa2b361453683f2279e1f796fdea054516a257562e4b5e3625aafc180d573cab41d31207b384fcb090698cf679e8ed17d3ec68c3d4eb7cf21b1ebd0df34867d5822d1781d9ec0d005abce80a1c7d7a85eacba919ef1f77b971cb80f4ec486bb60b73ab00ca577b69f8bf04eabfde991b700e7198c8447196a1baa8fbcbd6be36bf2517dea32c0f30a064c09e9e0f4eaafb6de3fbebeafb80c286b72c73060bd62ea47b7fa54d19a46b70c036aebf5a5b2cba4baf0199c2b1ac64d178f0be0114ee64fe1a6c1b9ade91368dd723560452719e046a84b8b4b6732e0680aac9cf4026b07e6e5475ec07c3e5d1e9534ac29b7f33597573cc8aba21e8d6cf569547d752f50745d5dfe14ae578c90d65c5f2da9f14adc791ead041acd982578b9e8b677c7f556fb95da147db9012242a9ca4906acb90ca8cdf1ba16ec9b11abf97d554cdde4e28854a968f2ce516e6eedd69286337d2a6b5dc39b7daa28af91cd0153cef5a9a8350d64bbb4ae94fa56ae6a4d29f5648ee1414a3d8b47b85449a92b6d703a6fda61258c062cadb84c3dc5003753f4720d68b97b4ed9a8eab17ef57b2d78de8950fdf698d180c302bec6d!
 051a6e7b084af719c7809628131c67e38c6d0d786cc8ecc5e2f63ce188ee31!
 0ffe938e
d0b21bc9f7bd9bbb4e766771d33f72f5761d9a1f4cef6179ef316607f5b6476337cfda75f67f4d22843d12fae0147f98028508d13a01900cfc3fbf068030f3e72d534bec61054c147000ec1d718703b1f23534ad37bb197a14743447e19a177b9976e7f37beb77c04fc01b86711bb14835588b5017761a0b50acbc6f5d53acff20bf08adbc056b7f36da6e8b4417c234e7b533b00b1a879bf2fe08312f89a7c6083e7bc87cc72e685fa77c200e377014f8cd261ce7ce06e2957b169f67432638f81c726b97b031ac13e2c110b54893f19a33dd049e2618291af8d107f140760ecde18b16731023e3ffe6f0498dd5860a22dc4c2c330c16888d94f9bb1ae80f7532fbe2b7e029ffaf17de324065cf47618e4998575179387b86b922899dd0c3c83f86a1cdaa0f4a40401b0776df041f56995f62bed671ae048030e50ca8de92549df42fa6ed4d5803949154ded18f5affbfd2d37d7579c53e54e45a33f18553e9157cf9ff6287f2bafd10f46b576734d7a307742f09ecbe6964f955dff5d13ba5a79e974b968cadc74c3eb5a1c508b045f230e383a1f700f3acfbf980178ae31b31ba7b7c921b13b0e1ec380ea05187b1287c035c6ef8ee3e030766f0c80f83dc3841f2cff002e5d23bd3b43f3f91632761ace43ba34438baf9df9d28c39d9e196b376069a20bb9ba1a5a99decee51!
 b9bda9dd8c7813647633b407daeb0c185b1da3b3add330e002d8251b9a5c26b49e4d80ba25260fa8afea4e33606ddf30c0f8fdf231bf3fa08ad6b5549c5379a1fc420644c723ba3a1b514a53baba1856b4125470c1127989a4c482e44f06cf8cf0ac4d64dd42560ef9935ef9f37ef9937ef937fdf2df325863403d0ec8bb585b0bdc798db540cb27e7947d57940e73041a9b29fda49bc01ffbb19b6ee0c3c7bc9de09aaf8b44699cfec00decc31256e375c60b703d94e0c6dfdf20f62cc6f8b371ec5fda781a3c0c360cd27eb785d0473e3c9f59d8976df6fe6b1bbbd561fb3fdc3dc99f833718c2f2fce24cb577dc84abf30cac06701c9ecb468f4647198a0c1de5010a262f60976c7c96efccac70dd12e10a9a2b1f6380a494ebef6bfe7fb2e8c6feee1c1ec90fd473765a71f7e5b78eb6a6a73f9e96ffb25f1db361751c84155cb0eaebf9e30cf0de0abe74e4ad04e201e2e6d928e9281f50cb37d498f0927cc0090db8e6ab5238cc0290b613749eef2557cdd455bf3fe0107f320ee7a17458829043fcb15b7ea7406f4f2f85afe568ff935962dbdda4ffe823daff3684f34d9bc27f16705a1d2c37b5cd5df77b57dd3dc86517efba237d4ced9d676657b8567e11c6efc7e98c7652d828c045283c2e40084a85d24b35e0280e6885191b428d2d0074fafa99d91da3d91321fb!
 3463fcfe138bd88541724f33041a036e5e3f46c64e13f0844896e2843ccd8c!
 3f84feb6
1eb63f2d51f85681d2f2368ebbe0a9f977a2ee17b7199abfc8cf3f870dee732fc05824067721140e917b98237431048f21100a30bf3c7fa601ea1ad0fcb373ca7554281c6e106a6cc1c63e36f7fbddc80fe24fc6895d18a37458301af0d8e2c6c504a56a81802744a19a63ccf33edb770b64dfde806587d037c3841e85d8bb5cadaff79de57e9cd618f6bf5d878e249e7b0e76750fe799f35a73fe344ebc3b41eced98d9198a34937b98a3f95233858d02216fe8d559e1f03e9ade193d31e78f627f03135b6eecef9687374d2c5ff3e3b555dcd5c5b0c9dede3639bcd1dcb0f1265fd0cfa7dc7d84e9bc59984d6d1a4d9a7860be67343baab2ca1a5e193ea9015903eb0fccc2eb657b83f53fba162d49a3aab889ce4ad97c597ec715c6f29ca441a5dc7457b93c27a947939b3d92a4627949d280d676e614d9f7d753d7c1db26655deb7c6d697b7a495b33c6d2af8ac525e9405a5b715799d9f5233481d1cb0db07680e4eeeacacdfb6bcb647e0c16a57dd70be4dd08b0dc27a943ca06a50ad2034baa5852de2bc92b6db998f54b0a6aee81b7aef267a9bd37679df0f391ad8822b3114d6d4da9e3768752e594ae2e5c55aa9c52df629fd62bebea5bec5351454d2e4c1a2364dc88d38d0ba63f7e8ddde1de4f3c4abe5b86c38fa0b11fec31f0c5e0691cceef41010895e0e91e9c2!
 fc06a09da1cf7d88059dd11e5086d0b7c3c571ffaa9c5f6d33d33b74f6dac7e9139ff221cb006e80df5d27ea59decbd2c2dd116b2ab595a1eb740cf2b3460ed00693f282928ed472485a56cd8941ff82559d2be3ba20fac179737bde67545f7f35a7dceaddff26aba3c29fe82178e081f22b2880f112b88b85b3e8ec7fd7fe2240e24074e9c0c595a34d3622a79f60991fa1f3d19cb34b6e2363aef7666c76b1abf72bcfeacf231acbde7547d7421227effc506f83fdfb78e8ec72ca5978e8c70eb7535e0c06df481dbe8ac756c048fd59f55de723b5f3efe1eaf94b7eac68c9623e25b5f8e01a69253478725f725dd91b4fff23342f53f3aee58aac8d2e4a6e9fc5cde7466dd654039ef1a43ae71364f956bd3a086f5ba93f5d1852fcf00bae56e841e3b2297ba939212afc18057ddd60364dd44de1c8acea24811f5dcb1b4b48f063396f2b2349235469c728db7549b3ec59a66f835590c7e399d9798ba35654e88ba46a8e164e2ec93a25f4a43cefcb2f89734f2b53be1063d5b47c764e76ecf49377f0d0cf8ff704f25dc53e2b5d5a86b8c2fe5acf06fe4f58f68e6ad19ba9f759bdf09d0cd4ce30cdda5b37f2ff046fd64264182ee4837499274b7b978b99b38f1339f79b318f06394b012f43febafff62a4b64ff15bc380fe683f373ebf4157a88bb1ed31ba2e74117ff6d!
 bc2801fa1a4d78cf88dcf6f102346bc210ecfc07acb62e87b43cfb3e0ab56e!
 e5ffb5dc
b4dd67e31b22393133cbd4a748fcd7cf50dfe92eec99b9352dc758109f74713354cba3fa87ae3dce0af70bd5122f8ab5cff0bcba281f5a04a7af10000000049454e44ae426082</data>
     </image>
 </images>
 <connections>
@@ -658,6 +658,7 @@
     <slot>slotIPv6clicked()</slot>
     <slot>slotMacClicked()</slot>
     <slot access="private">loadInfo()</slot>
+    <slot access="private">slotFinishLoad()</slot>
 </slots>
 <functions>
     <function returnType="bool">checkRange(QString IP)</function>

Modified: pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui
===================================================================
--- pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui	2007-03-08 18:18:52 UTC (rev 122)
+++ pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui	2007-03-08 18:20:23 UTC (rev 123)
@@ -877,6 +877,7 @@
     <slot access="private">slotOK()</slot>
     <slot access="private">slotMACClicked()</slot>
     <slot access="private">loadInfo()</slot>
+    <slot access="private">slotFinishLoading()</slot>
 </slots>
 <functions>
     <function>setDevice( QString Device )</function>

Modified: pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h
===================================================================
--- pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h	2007-03-08 18:18:52 UTC (rev 122)
+++ pcbsd/trunk/wificonfig/wificonfigwidgetbase.ui.h	2007-03-08 18:20:23 UTC (rev 123)
@@ -197,9 +197,8 @@
 void wificonfigWidgetBase::setDevice( QString Device )
 { 
     
-QString tmp, tmp2;
-bool ok;
 
+
 // Make sure our variables are initialized properly
 WEPKey = "";
 WEPIndex = 1;
@@ -218,215 +217,11 @@
   // Center the dialog window
  QDesktopWidget *d = QApplication::desktop();
  move(d->width() / 3, d->height() / 4);
+ 
+  // Connect the slot to refresh
+  QTimer::singleShot(100,  this,  SLOT(slotFinishLoading() ) );
   
-   // Get the ifconfig string
-   tmp = getValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 );
-   if ( tmp != "" ) {
-   // If the device is setup, start loading the settings
-
-   if ( tmp.find("OFF") != -1 ) {
-	   checkDisableWireless->setChecked(TRUE);
-	   tabMainWidget->setEnabled(FALSE);
-   } else if ( tmp.find("inet") == -1 )
-   {
-      checkDHCP->setChecked(TRUE);
-      lineNetmask->setText("255.255.255.0");
-      slotCheckDHCPBox();
-      
-            // Look for the mac address change
-	if ( tmp.find("ether") != -1 ) {
-		tmp2 = tmp;
-		tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
-		//if ( tmp.find(" ") != -1 ) {
-		//  tmp2.truncate(tmp.find(" ") );
-		//}
-		lineMAC->setText(tmp2);
-		checkMAC->setChecked(FALSE);
-		groupMAC->setEnabled(TRUE);
-	} 
-      
-   } else {
-	        // Get the IP address first
-		tmp2 = tmp;
-		tmp2 = tmp2.remove(0, tmp.find("inet") + 5 );
-		//tmp2 = tmp2.remove(0, tmp.find(" ") );
-		tmp2.truncate(tmp.find("netmask") -1 );
-		lineIP->setText(tmp2);
-
-		// Look for the netmask
-		if ( tmp.find("netmask") != -1 ) {
-			tmp2 = tmp;
-			tmp2 = tmp2.remove(0, tmp.find("netmask") + 8 );
-			if ( tmp.find("ether") != -1 ) {
-			tmp2.truncate(tmp.find("ether") );
-			}
-			lineNetmask->setText(tmp2);
-		} else {
-		   lineNetmask->setText("255.255.255.0");
-		}
-		
-	 // Look for the mac address change
-	if ( tmp.find("ether") != -1 ) {
-		tmp2 = tmp;
-		tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
-		//if ( tmp.find(" ") != -1 ) {
-		//  tmp2.truncate(tmp.find(" ") );
-		//}
-		lineMAC->setText(tmp2);
-		checkMAC->setChecked(FALSE);
-		groupMAC->setEnabled(TRUE);
-	} 
-   }
-
-
-   // Load the security information here
-   
-     // Start check for wpa_supplicant tag
-      if ( tmp.find("WPA") != -1 )
-      {
-	    // Look for the wpa_supplicant.conf file
-	    QFile file( "/etc/wpa_supplicant.conf" );
-    	    if ( file.open( IO_ReadOnly ) ) {
-        	QTextStream stream( &file );
-        	QString line;
-        	while ( !stream.atEnd() ) {
-            	line = stream.readLine(); // line of text excluding '\n'
-
-		   if ( line.find("ssid=") != -1 )
-		   {
-			tmp2 = line.remove(0, line.find("\"") +1 );
-			tmp2.truncate(tmp2.find("\"") );
-			lineSSID->setText(tmp2);
-		   }
-	
-		   if ( line.find("key_mgmt=") != -1 )
-		   {
-			tmp2 = line.remove(0, line.find("=") +1 );
-			if ( tmp2 == "NONE" ) {
-				radioSecurityWEP->setChecked(TRUE);
-			}
-			
-		   }
-		   if ( line.find("wep_key") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("=") +1 );
-			// Save the keycode
-			WEPKey = tmp2;
-			radioSecurityWEP->setChecked(TRUE);	
-		   }
-		    if ( line.find("wep_tx_keyidx") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("wep_tx_keyidx") +1 );
-			// Save the keycode
-			tmp2.truncate(tmp2.find("=") );
-			ok = tmp2.toInt(&ok);
-			if ( ok ) {
-			    WEPIndex = tmp2.toInt(&ok);
-			}
-			radioSecurityWEP->setChecked(TRUE);	
-		   }
-		  
-		    // Check if we are using WPA-Personal
-		    if ( line.find("psk=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("\"") + 1 );
-			tmp2.truncate( tmp2.find("\"") );
-			 
-			
-			// Save the keycode
-			WPAPersonalKey = tmp2;
-			radioSecurityWPAPersonal->setChecked(TRUE);	
-		   }
-		    
-		     // Check if we are using WPA-Enterprise
-		    if ( line.find("eap=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("=") + 1 );
-
-			//Check to see whic type of WPA-Ent we are using
-			if ( tmp2 == "TLS") {
-			    WPAEType = 1;
-			} else if (tmp2 == "TTLS" ) {
-			    WPAEType = 2;
-			} else if (tmp2 == "PEAP" ) {
-			    WPAEType = 3;
-			}
-			
-			radioSecurityWPAEnt->setChecked(TRUE);	
-		   }
-		    
-		     // Check for a identity= line
-		    if ( line.find("identity=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("\"") + 1 );
-			tmp2.truncate( tmp2.find("\"") );
-
-			// Save the keycode
-			WPAEIdent = tmp2;
-		   }
-		    
-		     // Check for a ca_cert= line
-		    if ( line.find("ca_cert=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("\"") + 1 );
-			tmp2.truncate( tmp2.find("\"") );
-
-			// Save the keycode
-			WPAECACert = tmp2;
-		   }
-	
-		     // Check for a client_cert= line
-		    if ( line.find("client_cert=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("\"") + 1 );
-			tmp2.truncate( tmp2.find("\"") );
-
-			// Save the keycode
-			WPAEClientCert = tmp2;
-		   }
-		    
-		     // Check for a private_key= line
-		    if ( line.find("private_key=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("\"") + 1 );
-			tmp2.truncate( tmp2.find("\"") );
-
-			// Save the keycode
-			WPAEPrivKeyFile = tmp2;
-		   }
-		    
-		    // Check for a private_key_passwd= line
-		    if ( line.find("private_key_passwd=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("\"") + 1 );
-			tmp2.truncate( tmp2.find("\"") );
-
-			// Save the keycode
-			WPAEPassword = tmp2;
-		   }
-		
-		     // Check for a private_key_passwd= line
-		    if ( line.find("password=") != -1 )
-		   {		       
-			tmp2 = line.remove(0, line.find("\"") + 1 );
-			tmp2.truncate( tmp2.find("\"") );
-
-			// Save the keycode
-			WPAEPassword = tmp2;
-		   }
-
-		}
-
-	}
-      }
-
-  }
-   
-   slotCheckSecurityRadio();
-   
-   
-   // Start loading the info tab
-   loadInfo();
+ 
 }
 
 
@@ -871,7 +666,7 @@
 
 QString wificonfigWidgetBase::getOutErrorsForIdent( QString ident )
 {
-         QString command = "netstat -I " +ident + " | grep \"Link\"";
+         QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -886,7 +681,7 @@
 
 QString wificonfigWidgetBase::getOutPacketsForIdent( QString ident )
 {
-        QString command = "netstat -I " +ident + " | grep \"Link\"";
+        QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -901,7 +696,7 @@
 
 QString wificonfigWidgetBase::getInErrorsForIdent( QString ident )
 {
-        QString command = "netstat -I " +ident + " | grep \"Link\"";
+        QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -916,7 +711,7 @@
 
 QString wificonfigWidgetBase::getInPacketsForIdent( QString ident )
 {
-        QString command = "netstat -I " +ident + " | grep \"Link\"";
+        QString command = "netstat -n -I " +ident + " | grep \"Link\"";
 	QString inputLine = getLineFromCommandOutput(command);
 	QString packets = "";
 	
@@ -1022,3 +817,220 @@
 {
      tabMainWidget->showPage( tabMainWidget->page(3) );
 }
+
+
+void wificonfigWidgetBase::slotFinishLoading()
+{
+    QString tmp, tmp2;
+bool ok;
+
+  // Get the ifconfig string
+   tmp = getValue( "/etc/rc.conf", "ifconfig_" + DeviceName + "=", 1 );
+   if ( tmp != "" ) {
+   // If the device is setup, start loading the settings
+
+   if ( tmp.find("OFF") != -1 ) {
+	   checkDisableWireless->setChecked(TRUE);
+	   tabMainWidget->setEnabled(FALSE);
+   } else if ( tmp.find("inet") == -1 )
+   {
+      checkDHCP->setChecked(TRUE);
+      lineNetmask->setText("255.255.255.0");
+      slotCheckDHCPBox();
+      
+            // Look for the mac address change
+	if ( tmp.find("ether") != -1 ) {
+		tmp2 = tmp;
+		tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
+		//if ( tmp.find(" ") != -1 ) {
+		//  tmp2.truncate(tmp.find(" ") );
+		//}
+		lineMAC->setText(tmp2);
+		checkMAC->setChecked(FALSE);
+		groupMAC->setEnabled(TRUE);
+	} 
+      
+   } else {
+	        // Get the IP address first
+		tmp2 = tmp;
+		tmp2 = tmp2.remove(0, tmp.find("inet") + 5 );
+		//tmp2 = tmp2.remove(0, tmp.find(" ") );
+		tmp2.truncate(tmp.find("netmask") -1 );
+		lineIP->setText(tmp2);
+
+		// Look for the netmask
+		if ( tmp.find("netmask") != -1 ) {
+			tmp2 = tmp;
+			tmp2 = tmp2.remove(0, tmp.find("netmask") + 8 );
+			if ( tmp.find("ether") != -1 ) {
+			tmp2.truncate(tmp.find("ether") );
+			}
+			lineNetmask->setText(tmp2);
+		} else {
+		   lineNetmask->setText("255.255.255.0");
+		}
+		
+	 // Look for the mac address change
+	if ( tmp.find("ether") != -1 ) {
+		tmp2 = tmp;
+		tmp2 = tmp2.remove(0, tmp.find("ether") + 6 );
+		//if ( tmp.find(" ") != -1 ) {
+		//  tmp2.truncate(tmp.find(" ") );
+		//}
+		lineMAC->setText(tmp2);
+		checkMAC->setChecked(FALSE);
+		groupMAC->setEnabled(TRUE);
+	} 
+   }
+
+
+   // Load the security information here
+   
+     // Start check for wpa_supplicant tag
+      if ( tmp.find("WPA") != -1 )
+      {
+	    // Look for the wpa_supplicant.conf file
+	    QFile file( "/etc/wpa_supplicant.conf" );
+    	    if ( file.open( IO_ReadOnly ) ) {
+        	QTextStream stream( &file );
+        	QString line;
+        	while ( !stream.atEnd() ) {
+            	line = stream.readLine(); // line of text excluding '\n'
+
+		   if ( line.find("ssid=") != -1 )
+		   {
+			tmp2 = line.remove(0, line.find("\"") +1 );
+			tmp2.truncate(tmp2.find("\"") );
+			lineSSID->setText(tmp2);
+		   }
+	
+		   if ( line.find("key_mgmt=") != -1 )
+		   {
+			tmp2 = line.remove(0, line.find("=") +1 );
+			if ( tmp2 == "NONE" ) {
+				radioSecurityWEP->setChecked(TRUE);
+			}
+			
+		   }
+		   if ( line.find("wep_key") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("=") +1 );
+			// Save the keycode
+			WEPKey = tmp2;
+			radioSecurityWEP->setChecked(TRUE);	
+		   }
+		    if ( line.find("wep_tx_keyidx") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("wep_tx_keyidx") +1 );
+			// Save the keycode
+			tmp2.truncate(tmp2.find("=") );
+			ok = tmp2.toInt(&ok);
+			if ( ok ) {
+			    WEPIndex = tmp2.toInt(&ok);
+			}
+			radioSecurityWEP->setChecked(TRUE);	
+		   }
+		  
+		    // Check if we are using WPA-Personal
+		    if ( line.find("psk=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("\"") + 1 );
+			tmp2.truncate( tmp2.find("\"") );
+			 
+			
+			// Save the keycode
+			WPAPersonalKey = tmp2;
+			radioSecurityWPAPersonal->setChecked(TRUE);	
+		   }
+		    
+		     // Check if we are using WPA-Enterprise
+		    if ( line.find("eap=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("=") + 1 );
+
+			//Check to see whic type of WPA-Ent we are using
+			if ( tmp2 == "TLS") {
+			    WPAEType = 1;
+			} else if (tmp2 == "TTLS" ) {
+			    WPAEType = 2;
+			} else if (tmp2 == "PEAP" ) {
+			    WPAEType = 3;
+			}
+			
+			radioSecurityWPAEnt->setChecked(TRUE);	
+		   }
+		    
+		     // Check for a identity= line
+		    if ( line.find("identity=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("\"") + 1 );
+			tmp2.truncate( tmp2.find("\"") );
+
+			// Save the keycode
+			WPAEIdent = tmp2;
+		   }
+		    
+		     // Check for a ca_cert= line
+		    if ( line.find("ca_cert=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("\"") + 1 );
+			tmp2.truncate( tmp2.find("\"") );
+
+			// Save the keycode
+			WPAECACert = tmp2;
+		   }
+	
+		     // Check for a client_cert= line
+		    if ( line.find("client_cert=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("\"") + 1 );
+			tmp2.truncate( tmp2.find("\"") );
+
+			// Save the keycode
+			WPAEClientCert = tmp2;
+		   }
+		    
+		     // Check for a private_key= line
+		    if ( line.find("private_key=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("\"") + 1 );
+			tmp2.truncate( tmp2.find("\"") );
+
+			// Save the keycode
+			WPAEPrivKeyFile = tmp2;
+		   }
+		    
+		    // Check for a private_key_passwd= line
+		    if ( line.find("private_key_passwd=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("\"") + 1 );
+			tmp2.truncate( tmp2.find("\"") );
+
+			// Save the keycode
+			WPAEPassword = tmp2;
+		   }
+		
+		     // Check for a private_key_passwd= line
+		    if ( line.find("password=") != -1 )
+		   {		       
+			tmp2 = line.remove(0, line.find("\"") + 1 );
+			tmp2.truncate( tmp2.find("\"") );
+
+			// Save the keycode
+			WPAEPassword = tmp2;
+		   }
+
+		}
+
+	}
+      }
+
+  }
+   
+   slotCheckSecurityRadio();
+   
+   
+   // Start loading the info tab
+   loadInfo();
+
+}



More information about the Commits mailing list