[PC-BSD Commits] r3991 - pcbsd/trunk-current/pcbsd-netmanager/src/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Thu May 28 09:52:40 PDT 2009


Author: kris
Date: 2009-05-28 09:52:40 -0700 (Thu, 28 May 2009)
New Revision: 3991

Modified:
   pcbsd/trunk-current/pcbsd-netmanager/src/NetworkManager/networkman.cpp
Log:

Updated the network manager a bit more, doesn't need to refresh on a timer anymore



Modified: pcbsd/trunk-current/pcbsd-netmanager/src/NetworkManager/networkman.cpp
===================================================================
--- pcbsd/trunk-current/pcbsd-netmanager/src/NetworkManager/networkman.cpp	2009-05-28 16:47:22 UTC (rev 3990)
+++ pcbsd/trunk-current/pcbsd-netmanager/src/NetworkManager/networkman.cpp	2009-05-28 16:52:40 UTC (rev 3991)
@@ -163,32 +163,19 @@
    }
     
     
+   DevsIP[sel] = getIpForIdent(Devs[sel]);
+   DevsStatus[sel] = getStatusForIdent(Devs[sel]);
+   DevsNetmask[sel] = getNetmaskForIdent(Devs[sel]);
     
-    if ( DevsType[sel] == "Wireless")
-   {
-    textStatusLabel1->setText("Address:");	
-    textStatus1->setText(tr("IP: ") + DevsIP[sel] + " / " + tr("Netmask: ") + DevsNetmask[sel]);
+   textStatusLabel1->setText("Address:");	
+   textStatus1->setText(tr("IP: ") + DevsIP[sel] + " / " + tr("Netmask: ") + DevsNetmask[sel]);
     
-    textStatusLabel2->setText("MAC Address:");
-    textStatus2->setText(DevsMAC[sel]);
+   textStatusLabel2->setText("MAC Address:");
+   textStatus2->setText(DevsMAC[sel]);
+   
+   textStatusLabel3->setText("Status:");
+   textStatus3->setText(DevsStatus[sel]);
     
-    textStatusLabel3->setText("Status:");
-    textStatus3->setText(DevsStatus[sel]);
-    
-    } else {
-	
-    textStatusLabel1->setText("Address:");	
-    textStatus1->setText(tr("IP: ") + DevsIP[sel] + " / " + tr("Netmask: ") + DevsNetmask[sel]);
-    
-    textStatusLabel2->setText("MAC Address:");
-    textStatus2->setText(DevsMAC[sel]);
-    
-    textStatusLabel3->setText("Status:");
-    textStatus3->setText(DevsStatus[sel]);
-    
-    }
-
-    
   }
     
 }
@@ -564,29 +551,13 @@
 		if ( DevsType[i] == "Wireless")
 		{
 		    
-		    // If we are using a Wireless device
-		    if ( DevsStatus[i] == "associated" && DevsUp[i] == "UP" )
-		    {
-		       QPixmap PixmapIcon(KStandardDirs::locate("data", "pc-netmanager/pics/network_wifi.png"));
-		       listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
-		    } else {
-		       QPixmap PixmapIcon(KStandardDirs::locate("data", "pc-netmanager/pics/network_wifi_dis.png"));
-		       listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
-		    }
-	                  
+		    QPixmap PixmapIcon(KStandardDirs::locate("data", "pc-netmanager/pics/network_wifi.png"));
+		    listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
 		    
 		 } else {
-		   // If we are looking at a regular Ethernet device  
-		     
-		    if ( (DevsStatus[i] == "active" || DevsStatus[i] == "") && DevsUp[i] == "UP" )
-		    {
-		       QPixmap PixmapIcon(KStandardDirs::locate("data", "pc-netmanager/pics/network_local.png"));
-		       listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
-		    } else {
-		       QPixmap PixmapIcon(KStandardDirs::locate("data", "pc-netmanager/pics/network_local_dis.png"));
-		       listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
-		    }
-	                  
+		    // If we are looking at a regular Ethernet device  
+		    QPixmap PixmapIcon(KStandardDirs::locate("data", "pc-netmanager/pics/network_local.png"));
+		    listNetDev->addItem(new QListWidgetItem(PixmapIcon.scaled(32,32), Devs[i] + " (" +DevsName[i] + ")") );
 		}
 	
 	i++;



More information about the Commits mailing list