[PC-BSD Commits] r9771 - in pcbsd/current/src-qt4: libpcbsd pc-netmanager/src/wificonfig

svn at pcbsd.org svn at pcbsd.org
Wed Mar 23 17:32:38 PDT 2011


Author: kenmoore
Date: 2011-03-23 17:32:37 -0700 (Wed, 23 Mar 2011)
New Revision: 9771

Added:
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/scan-wifi.png
Modified:
   pcbsd/current/src-qt4/libpcbsd/netif.cpp
   pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h
   pcbsd/current/src-qt4/libpcbsd/utils.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/object-unlocked.png
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiscanssid.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiselectiondialog.cpp
Log:
Large update to the new wifi selection GUI and process as well as some fixes to the newly added libpcbsd functions


Modified: pcbsd/current/src-qt4/libpcbsd/netif.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/netif.cpp	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/libpcbsd/netif.cpp	2011-03-24 00:32:37 UTC (rev 9771)
@@ -38,6 +38,7 @@
 
 #include <qregexp.h>
 #include <qstring.h>
+//#include <QMessageBox>
 
 #include "pcbsd-netif.h"
 #include "pcbsd-utils.h"
@@ -336,23 +337,25 @@
 }
 
 QString NetworkInterface::getWifiSecurity( QString SSID, QString deviceName ){
-  //Make sure the SSID is less than 16 long (non verbose to be used)
+  //Make sure the SSID is less than 16 long (non verbose will be used to search)
   QString smSSID;
   if(SSID.size() > 16){
-    smSSID = SSID.left(15);
+    smSSID = SSID.left(10);
   }else{
     smSSID = SSID; 
   }
   //Scan the wifi to determine the security type
-  QString command = "ifconfig " + deviceName + " list scan | grep " + smSSID;
-  QString ifconfOut = Utils::runShellCommandLine(command);
+  QString command = "ifconfig " + deviceName + " list scan";
+  QString ifconfOut = Utils::runShellCommandSearch(command,smSSID);
   QStringList parsed = NetworkInterface::parseWifiScanLine(ifconfOut,false);
   QString caps = parsed[6];
+  bool noSecure=true;
+  if(!parsed[7].isEmpty()){noSecure=false;}
   QStringList secure = parsed[7].split(" "); //put each security type in a different list element
-  
+    
   //Examine the CAPS and Security data to determine the wifi encryption type
-  bool isDisabled = !caps.contains("P") && caps.contains("ES") && (secure.size()==-1); //CAPS = "ES" only -> no security
-  bool isWEP = caps.contains("EP") && (secure.size()==-1); //CAPS = "EP" or "EPS" only (could also be RADIUS security type)
+  bool isDisabled = !caps.contains("P") && caps.contains("ES") && noSecure; //CAPS = "ES" only -> no security
+  bool isWEP = caps.contains("EP") && noSecure; //CAPS = "EP" or "EPS" only (could also be RADIUS security type)
   bool isWPA = secure.contains("WPA"); //both WPA personal and enterprise
   bool isWPA2 = secure.contains("RSN"); //both WPA2 personal and enterprise
   
@@ -362,10 +365,10 @@
     securityType = "None";
   }else if(isWEP){ 
     securityType = "WEP";
+  }else if(isWPA2){ 
+    securityType = "WPA2";
   }else if(isWPA){ 
     securityType = "WPA";
-  }else if(isWPA2){ 
-    securityType = "WPA2";
   }else{ 
     securityType = "ERROR";
   }

Modified: pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/libpcbsd/pcbsd-utils.h	2011-03-24 00:32:37 UTC (rev 9771)
@@ -54,7 +54,7 @@
    static QString getConfFileValue( QString oFile, QString Key );
    static QString getConfFileValue( QString oFile, QString Key, int occur );
    static QStringList runShellCommand( QString command );
-   static QString runShellCommandLine( QString command );
+   static QString runShellCommandSearch( QString command, QString sch );
 };
 
 #endif

Modified: pcbsd/current/src-qt4/libpcbsd/utils.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/utils.cpp	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/libpcbsd/utils.cpp	2011-03-24 00:32:37 UTC (rev 9771)
@@ -344,13 +344,15 @@
  return out;
 }
 
-//Run a shell command (return output in original formatting)
-//This version is useful for a command that return a single line of output
-QString Utils::runShellCommandLine( QString command )
+//Run a shell command and return only lines with a specific search term
+//Example command: ls | grep X -> runShellCommandSearch("ls","X")
+QString Utils::runShellCommandSearch( QString command, QString sch)
 {
- QProcess p;
- p.start(command);
- p.waitForFinished(-1);
- QString outstr = p.readAllStandardOutput();
+ QStringList L = Utils::runShellCommand(command);
+ QStringList schList = sch.split(" "); //make a list of the words to search for in a single line
+ for(int i=0; i<schList.size(); i++){
+   L = L.filter(schList[i]);
+ }
+ QString outstr = L.join("\n"); //combine the remaining lines into a single string
  return outstr;
 }

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/object-unlocked.png
===================================================================
(Binary files differ)


Property changes on: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/scan-wifi.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2011-03-24 00:32:37 UTC (rev 9771)
@@ -282,8 +282,8 @@
   connect( pushAddWifi, SIGNAL( clicked() ), this, SLOT( slotAddNewProfile() ) ); 
   connect( pushEditWifi, SIGNAL( clicked() ), this, SLOT( slotEditProfile() ) ); 
   connect( pushRemoveWifi, SIGNAL( clicked() ), this, SLOT( slotRemoveProfile() ) ); 
+  connect( pushRescan, SIGNAL( clicked() ), this, SLOT( slotRescan() ) );
 
-
   // Save the device name for later
   DeviceName = Device;
 
@@ -298,9 +298,52 @@
   QSettings settings("PCBSD");
   usingLagg = settings.value("/pc-netmanager/useLagg", false).toBool();
  
+  //Load the available wifi access points
+  slotRescan();
+  
 }
 
 
+void wificonfigwidgetbase::slotRescan()
+{
+    QString strength, ssid, security, FileLoad;
+    QStringList ifconfout, ifline;    
+    int foundItem = 0;
+
+    // Clear the list box and disable the add button
+    listNewWifi->clear();
+    pushAddWifi->setEnabled(FALSE);
+            
+    // Start the scan and get the output
+    ifconfout = Utils::runShellCommand("ifconfig -v " + DeviceName + " up list scan");
+
+    //display the info for each wifi access point
+    for(int i=1; i<ifconfout.size(); i++){    //Skip the header line by starting at 1
+      ifline = NetworkInterface::parseWifiScanLine(ifconfout[i],true); //get a single line
+      //save the info for this wifi
+      ssid = ifline[0];
+      strength = ifline[4];
+      //determine the icon based on if there is security encryption
+      security = NetworkInterface::getWifiSecurity(ssid,DeviceName);
+      if(security.contains("None")){
+	FileLoad = ":object-unlocked.png";
+      }else{
+	FileLoad = ":object-locked.png";
+      }
+      //Add the wifi access point to the list
+      listNewWifi->addItem(new QListWidgetItem(QIcon(FileLoad), ssid + " (signal: " +strength + ")") );
+      foundItem = 1; //set the flag for wifi signals found  
+    }
+    
+    if ( foundItem == 1 ){
+      listNewWifi->setCurrentRow(-1);
+      pushAddWifi->setEnabled(TRUE);
+    } else {
+      pushAddWifi->setEnabled(FALSE);
+    }
+
+}
+
 bool wificonfigwidgetbase::checkRange( QString IP )
 {
 int num;
@@ -588,16 +631,48 @@
 
 void wificonfigwidgetbase::slotAddNewProfile()
 {
-   wifiselect = new wifiselectiondialog();
-   wifiselect->init(DeviceName);
+   //Get the selected SSID
+   if( (listNewWifi->currentRow())!=-1 ){
+    QString line = listNewWifi->item(listNewWifi->currentRow())->text();
+    QString ssidc = line.section(" (",0,0,QString::SectionSkipEmpty);
+    //Get the Security Type
+    QString sec = NetworkInterface::getWifiSecurity(ssidc,DeviceName);
+    //QMessageBox::warning( this, "Testing", "SSID: "+ssidc+"  sec: "+sec );
+    //Open the proper security dialog and link it to the save slots
+    if(sec.contains("None")){
+      slotAddNewProfileOpen(ssidc,false); //call the function to save the variables (no security settings)
+    }else if(sec.contains("WEP")){
+     dialogWEP = new wepConfig();
+     connect( dialogWEP, SIGNAL( saved(QString, int, bool) ), this, SLOT( slotWEPSave(QString, int, bool) ) );
+     dialogWEP->exec();
+    }else if(sec.contains("WPA")){ //both WPA and WPA2 encryption
+     dialogWPA = new dialogWPAPersonal();
+     connect( dialogWPA, SIGNAL( saved(QString) ), this, SLOT( slotWPAPSave(QString) ) );
+     dialogWPA->exec();
+    }else{
+      //Put error handling here
+    }
+   }else{
+     QMessageBox::warning(this,"No Wifi Point Selected","Please select a wireless network to add");
+   }
+}
 
-   // Connect our save slots
-   connect( wifiselect, SIGNAL( signalSavedOpen(QString, bool) ), this, SLOT( slotAddNewProfileOpen(QString, bool) ) ); 
-   connect( wifiselect, SIGNAL( signalSavedWEP( QString, bool, QString, int, bool ) ), this, SLOT( slotAddNewProfileWEP( QString, bool, QString, int, bool) ) ); 
-   connect( wifiselect, SIGNAL( signalSavedWPA(QString, bool, QString) ), this, SLOT( slotAddNewProfileWPA(QString, bool, QString) ) ); 
-   connect( wifiselect, SIGNAL( signalSavedWPAE(QString, bool, int, QString, QString, QString, QString, QString) ), this, SLOT( slotAddNewProfileWPAE(QString, bool, int, QString, QString, QString, QString, QString) ) ); 
+void wificonfigwidgetbase::slotWEPSave(QString newkey, int newindex, bool hexkey)
+{
+  //get the ssid
+  QString line = listNewWifi->item(listNewWifi->currentRow())->text();
+  QString ssidc = line.section(" (",0,0,QString::SectionSkipEmpty);
+  //Add the profile
+  slotAddNewProfileWEP(ssidc,false,newkey,newindex,hexkey);
+}
 
-   wifiselect->exec();
+void wificonfigwidgetbase::slotWPAPSave(QString newkey)
+{
+  //get the ssid
+  QString line = listNewWifi->item(listNewWifi->currentRow())->text();
+  QString ssidc = line.section(" (",0,0,QString::SectionSkipEmpty);
+  //Add the profile
+  slotAddNewProfileWPA(ssidc,false,newkey);
 }
 
 

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h	2011-03-24 00:32:37 UTC (rev 9771)
@@ -57,6 +57,9 @@
     void slotRefreshSSIDList();
     void slotMoveUp();
     void slotMoveDown();
+    void slotRescan();
+    void slotWEPSave(QString newkey, int newIndex, bool hexkey );
+    void slotWPAPSave(QString newkey);
 
 private:
     bool checkRange( QString IP );
@@ -80,6 +83,9 @@
     void setupWifiLagg(QString dev);
     QString DeviceName;
     QString DeviceNameParent;
+    
+    dialogWPAPersonal *dialogWPA;
+    wepConfig *dialogWEP;
     wifiselectiondialog *wifiselect;
     QProcess *netifProc;
 

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui	2011-03-24 00:32:37 UTC (rev 9771)
@@ -1,58 +1,59 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>wificonfigwidgetbase</class>
- <widget class="QWidget" name="wificonfigwidgetbase" >
-  <property name="geometry" >
+ <widget class="QWidget" name="wificonfigwidgetbase">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>320</width>
-    <height>463</height>
+    <width>350</width>
+    <height>540</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Wireless Configuration</string>
   </property>
-  <property name="windowIcon" >
-   <iconset resource="wificonfig.qrc" >
+  <property name="windowIcon">
+   <iconset resource="wificonfig.qrc">
     <normaloff>:/tray_wifi85.png</normaloff>:/tray_wifi85.png</iconset>
   </property>
-  <layout class="QGridLayout" >
-   <item row="2" column="3" >
-    <widget class="QPushButton" name="buttonCancel" >
-     <property name="text" >
+  <layout class="QGridLayout">
+   <item row="2" column="3">
+    <widget class="QPushButton" name="buttonCancel">
+     <property name="text">
       <string>Close</string>
      </property>
-     <property name="shortcut" >
+     <property name="shortcut">
       <string/>
      </property>
     </widget>
    </item>
-   <item row="1" column="0" colspan="4" >
-    <widget class="QCheckBox" name="checkDisableWireless" >
-     <property name="text" >
+   <item row="1" column="0" colspan="4">
+    <widget class="QCheckBox" name="checkDisableWireless">
+     <property name="text">
       <string>Disable this wireless device</string>
      </property>
     </widget>
    </item>
-   <item row="2" column="2" >
-    <widget class="QPushButton" name="pushApply" >
-     <property name="text" >
+   <item row="2" column="2">
+    <widget class="QPushButton" name="pushApply">
+     <property name="text">
       <string>&Apply</string>
      </property>
-     <property name="shortcut" >
+     <property name="shortcut">
       <string>Alt+A</string>
      </property>
     </widget>
    </item>
-   <item row="2" column="0" >
-    <spacer name="spacer1" >
-     <property name="orientation" >
+   <item row="2" column="0">
+    <spacer name="spacer1">
+     <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="sizeType" >
+     <property name="sizeType">
       <enum>QSizePolicy::Expanding</enum>
      </property>
-     <property name="sizeHint" stdset="0" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>100</width>
        <height>21</height>
@@ -60,52 +61,42 @@
      </property>
     </spacer>
    </item>
-   <item row="2" column="1" >
-    <widget class="QPushButton" name="pushOK" >
-     <property name="text" >
+   <item row="2" column="1">
+    <widget class="QPushButton" name="pushOK">
+     <property name="text">
       <string>&OK</string>
      </property>
-     <property name="shortcut" >
+     <property name="shortcut">
       <string>Alt+O</string>
      </property>
     </widget>
    </item>
-   <item row="0" column="0" colspan="4" >
-    <widget class="QTabWidget" name="tabMainWidget" >
-     <property name="currentIndex" >
+   <item row="0" column="0" colspan="4">
+    <widget class="QTabWidget" name="tabMainWidget">
+     <property name="currentIndex">
       <number>0</number>
      </property>
-     <widget class="QWidget" name="tab" >
-      <attribute name="title" >
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
        <string>&General</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout_3" >
-       <item row="0" column="0" >
-        <widget class="QLabel" name="textLabel2" >
-         <property name="text" >
-          <string>Wireless network profiles</string>
-         </property>
-         <property name="wordWrap" >
-          <bool>false</bool>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="0" >
-        <layout class="QGridLayout" name="gridLayout_2" >
-         <item row="0" column="0" >
-          <widget class="QListWidget" name="listWifi" />
+      <layout class="QGridLayout" name="gridLayout_3">
+       <item row="2" column="0">
+        <layout class="QGridLayout" name="gridLayout_2">
+         <item row="2" column="0">
+          <widget class="QListWidget" name="listWifi"/>
          </item>
-         <item row="0" column="1" >
-          <layout class="QVBoxLayout" name="verticalLayout" >
-           <property name="sizeConstraint" >
+         <item row="2" column="1">
+          <layout class="QVBoxLayout" name="verticalLayout">
+           <property name="sizeConstraint">
             <enum>QLayout::SetDefaultConstraint</enum>
            </property>
            <item>
-            <spacer name="verticalSpacer_2" >
-             <property name="orientation" >
+            <spacer name="verticalSpacer_2">
+             <property name="orientation">
               <enum>Qt::Vertical</enum>
              </property>
-             <property name="sizeHint" stdset="0" >
+             <property name="sizeHint" stdset="0">
               <size>
                <width>28</width>
                <height>18</height>
@@ -114,45 +105,45 @@
             </spacer>
            </item>
            <item>
-            <widget class="QPushButton" name="pushUp" >
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+            <widget class="QPushButton" name="pushUp">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="text" >
+             <property name="text">
               <string/>
              </property>
-             <property name="icon" >
-              <iconset resource="wificonfig.qrc" >
+             <property name="icon">
+              <iconset resource="wificonfig.qrc">
                <normaloff>:/arrow-up.png</normaloff>:/arrow-up.png</iconset>
              </property>
             </widget>
            </item>
            <item>
-            <widget class="QPushButton" name="pushDown" >
-             <property name="sizePolicy" >
-              <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+            <widget class="QPushButton" name="pushDown">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
                <horstretch>0</horstretch>
                <verstretch>0</verstretch>
               </sizepolicy>
              </property>
-             <property name="text" >
+             <property name="text">
               <string/>
              </property>
-             <property name="icon" >
-              <iconset resource="wificonfig.qrc" >
+             <property name="icon">
+              <iconset resource="wificonfig.qrc">
                <normaloff>:/arrow-down.png</normaloff>:/arrow-down.png</iconset>
              </property>
             </widget>
            </item>
            <item>
-            <spacer name="verticalSpacer" >
-             <property name="orientation" >
+            <spacer name="verticalSpacer">
+             <property name="orientation">
               <enum>Qt::Vertical</enum>
              </property>
-             <property name="sizeHint" stdset="0" >
+             <property name="sizeHint" stdset="0">
               <size>
                <width>20</width>
                <height>40</height>
@@ -162,181 +153,253 @@
            </item>
           </layout>
          </item>
-        </layout>
-       </item>
-       <item row="2" column="0" >
-        <layout class="QHBoxLayout" name="horizontalLayout" >
-         <item>
-          <widget class="QPushButton" name="pushAddWifi" >
-           <property name="text" >
-            <string>Add</string>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label">
+           <property name="font">
+            <font>
+             <pointsize>9</pointsize>
+             <italic>true</italic>
+            </font>
            </property>
-           <property name="icon" >
-            <iconset resource="wificonfig.qrc" >
-             <normaloff>:/list-add.png</normaloff>:/list-add.png</iconset>
+           <property name="text">
+            <string>(Higher connections are given priority)</string>
            </property>
-           <property name="shortcut" >
-            <string>Alt+S</string>
-           </property>
           </widget>
          </item>
-         <item>
-          <widget class="QPushButton" name="pushEditWifi" >
-           <property name="text" >
-            <string>Edit</string>
+         <item row="0" column="0">
+          <widget class="QLabel" name="textLabel2">
+           <property name="text">
+            <string>Configured Wireless Network Profiles</string>
            </property>
-           <property name="icon" >
-            <iconset resource="wificonfig.qrc" >
-             <normaloff>:/configure.png</normaloff>:/configure.png</iconset>
+           <property name="wordWrap">
+            <bool>false</bool>
            </property>
           </widget>
          </item>
+         <item row="3" column="0">
+          <layout class="QHBoxLayout" name="horizontalLayout">
+           <item>
+            <widget class="QPushButton" name="pushEditWifi">
+             <property name="text">
+              <string>Edit</string>
+             </property>
+             <property name="icon">
+              <iconset resource="wificonfig.qrc">
+               <normaloff>:/configure.png</normaloff>:/configure.png</iconset>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="pushRemoveWifi">
+             <property name="text">
+              <string>Remove</string>
+             </property>
+             <property name="icon">
+              <iconset resource="wificonfig.qrc">
+               <normaloff>:/edit-delete.png</normaloff>:/edit-delete.png</iconset>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <spacer name="horizontalSpacer">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>40</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item row="5" column="0">
+        <layout class="QGridLayout" name="gridLayout">
+         <item row="1" column="0">
+          <widget class="QListWidget" name="listNewWifi"/>
+         </item>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>Available Wireless Networks</string>
+           </property>
+          </widget>
+         </item>
+         <item row="7" column="0">
+          <layout class="QHBoxLayout" name="horizontalLayout_2">
+           <item>
+            <widget class="QPushButton" name="pushAddWifi">
+             <property name="text">
+              <string>Add To Profiles</string>
+             </property>
+             <property name="icon">
+              <iconset resource="wificonfig.qrc">
+               <normaloff>:/list-add.png</normaloff>:/list-add.png</iconset>
+             </property>
+             <property name="shortcut">
+              <string>Alt+S</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QPushButton" name="pushRescan">
+             <property name="text">
+              <string>Scan</string>
+             </property>
+             <property name="icon">
+              <iconset>
+               <normaloff>../../../../../../../../../home/moore/pcbsdwork/current/src-qt4/pc-netmanager/src/wificonfig/scan-wifi.png</normaloff>../../../../../../../../../home/moore/pcbsdwork/current/src-qt4/pc-netmanager/src/wificonfig/scan-wifi.png</iconset>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <spacer name="horizontalSpacer_2">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>40</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </item>
+        </layout>
+       </item>
+       <item row="4" column="0">
+        <widget class="Line" name="line">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item row="7" column="0">
+        <layout class="QVBoxLayout" name="verticalLayout_2">
          <item>
-          <widget class="QPushButton" name="pushRemoveWifi" >
-           <property name="text" >
-            <string>Remove</string>
+          <widget class="QCheckBox" name="checkDHCP">
+           <property name="text">
+            <string>O&btain IP automatically (DHCP)</string>
            </property>
-           <property name="icon" >
-            <iconset resource="wificonfig.qrc" >
-             <normaloff>:/edit-delete.png</normaloff>:/edit-delete.png</iconset>
+           <property name="shortcut">
+            <string>Alt+B</string>
            </property>
           </widget>
          </item>
          <item>
-          <spacer name="horizontalSpacer" >
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
+          <widget class="QGroupBox" name="groupBoxIP">
+           <property name="title">
+            <string>Assign static IP address</string>
            </property>
-           <property name="sizeHint" stdset="0" >
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
+           <layout class="QGridLayout">
+            <item row="0" column="0">
+             <widget class="QLabel" name="textLabel3">
+              <property name="text">
+               <string>IP:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QLabel" name="textLabel3_2">
+              <property name="text">
+               <string>Netmask:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="wordWrap">
+               <bool>false</bool>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QLineEdit" name="lineNetmask">
+              <property name="inputMask">
+               <string>999\.999\.999\.999; </string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignHCenter</set>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QLineEdit" name="lineIP">
+              <property name="inputMask">
+               <string>999\.999\.999\.999; </string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignHCenter</set>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
          </item>
         </layout>
        </item>
-       <item row="4" column="0" >
-        <widget class="Line" name="line1" >
-        </widget>
-       </item>
-       <item row="5" column="0" >
-        <widget class="QCheckBox" name="checkDHCP" >
-         <property name="text" >
-          <string>O&btain IP automatically (DHCP)</string>
+       <item row="6" column="0">
+        <widget class="Line" name="line_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
          </property>
-         <property name="shortcut" >
-          <string>Alt+B</string>
-         </property>
         </widget>
        </item>
-       <item row="6" column="0" >
-        <widget class="QGroupBox" name="groupBoxIP" >
-         <property name="title" >
-          <string>Assign static IP address</string>
-         </property>
-         <layout class="QGridLayout" >
-          <item row="0" column="0" >
-           <widget class="QLabel" name="textLabel3" >
-            <property name="text" >
-             <string>IP:</string>
-            </property>
-            <property name="alignment" >
-             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-            </property>
-            <property name="wordWrap" >
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="0" >
-           <widget class="QLabel" name="textLabel3_2" >
-            <property name="text" >
-             <string>Netmask:</string>
-            </property>
-            <property name="alignment" >
-             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-            </property>
-            <property name="wordWrap" >
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-          <item row="1" column="1" >
-           <widget class="QLineEdit" name="lineNetmask" >
-            <property name="inputMask" >
-             <string>999\.999\.999\.999; </string>
-            </property>
-            <property name="alignment" >
-             <set>Qt::AlignHCenter</set>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="1" >
-           <widget class="QLineEdit" name="lineIP" >
-            <property name="inputMask" >
-             <string>999\.999\.999\.999; </string>
-            </property>
-            <property name="alignment" >
-             <set>Qt::AlignHCenter</set>
-            </property>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item row="3" column="0" >
-        <widget class="QLabel" name="label" >
-         <property name="text" >
-          <string>Note: Higher connections are given priority</string>
-         </property>
-        </widget>
-       </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="TabPage" >
-      <attribute name="title" >
+     <widget class="QWidget" name="TabPage">
+      <attribute name="title">
        <string>Advanced</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout_1" >
-       <item row="0" column="0" >
-        <widget class="QCheckBox" name="checkMAC" >
-         <property name="text" >
+      <layout class="QGridLayout" name="gridLayout_1">
+       <item row="0" column="0">
+        <widget class="QCheckBox" name="checkMAC">
+         <property name="text">
           <string>Use hardware defau&lt MAC address</string>
          </property>
-         <property name="shortcut" >
+         <property name="shortcut">
           <string>Alt+L</string>
          </property>
-         <property name="checked" >
+         <property name="checked">
           <bool>true</bool>
          </property>
         </widget>
        </item>
-       <item row="1" column="0" >
-        <widget class="QGroupBox" name="groupMAC" >
-         <property name="enabled" >
+       <item row="1" column="0">
+        <widget class="QGroupBox" name="groupMAC">
+         <property name="enabled">
           <bool>false</bool>
          </property>
-         <property name="title" >
+         <property name="title">
           <string>Custom MAC address</string>
          </property>
-         <layout class="QGridLayout" >
-          <item row="0" column="0" >
-           <widget class="QLineEdit" name="lineMAC" />
+         <layout class="QGridLayout">
+          <item row="0" column="0">
+           <widget class="QLineEdit" name="lineMAC"/>
           </item>
          </layout>
         </widget>
        </item>
-       <item row="2" column="0" >
-        <spacer name="spacer7" >
-         <property name="orientation" >
+       <item row="2" column="0">
+        <spacer name="spacer7">
+         <property name="orientation">
           <enum>Qt::Vertical</enum>
          </property>
-         <property name="sizeType" >
+         <property name="sizeType">
           <enum>QSizePolicy::Expanding</enum>
          </property>
-         <property name="sizeHint" stdset="0" >
+         <property name="sizeHint" stdset="0">
           <size>
            <width>240</width>
            <height>140</height>
@@ -346,232 +409,232 @@
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="TabPage2" >
-      <attribute name="title" >
+     <widget class="QWidget" name="TabPage2">
+      <attribute name="title">
        <string>Info</string>
       </attribute>
-      <layout class="QGridLayout" >
-       <item row="0" column="0" >
-        <widget class="QLabel" name="textInfoName" >
-         <property name="text" >
+      <layout class="QGridLayout">
+       <item row="0" column="0">
+        <widget class="QLabel" name="textInfoName">
+         <property name="text">
           <string/>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>false</bool>
          </property>
         </widget>
        </item>
-       <item row="1" column="0" >
-        <widget class="QGroupBox" name="groupBox4" >
-         <property name="title" >
+       <item row="1" column="0">
+        <widget class="QGroupBox" name="groupBox4">
+         <property name="title">
           <string>Configuration info</string>
          </property>
-         <layout class="QGridLayout" >
-          <item row="0" column="0" >
-           <widget class="QLabel" name="textLabel3_3" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+         <layout class="QGridLayout">
+          <item row="0" column="0">
+           <widget class="QLabel" name="textLabel3_3">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="text" >
+            <property name="text">
              <string>IP:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="4" column="0" >
-           <widget class="QLabel" name="textLabel3_2_2_2_2" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+          <item row="4" column="0">
+           <widget class="QLabel" name="textLabel3_2_2_2_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="text" >
+            <property name="text">
              <string>Mac/Ether:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="4" column="1" >
-           <widget class="QLabel" name="textMac" >
-            <property name="text" >
+          <item row="4" column="1">
+           <widget class="QLabel" name="textMac">
+            <property name="text">
              <string/>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="1" column="0" >
-           <widget class="QLabel" name="textLabel3_2_2" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+          <item row="1" column="0">
+           <widget class="QLabel" name="textLabel3_2_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="text" >
+            <property name="text">
              <string>Netmask:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="2" column="0" >
-           <widget class="QLabel" name="textLabel3_2_3" >
-            <property name="text" >
+          <item row="2" column="0">
+           <widget class="QLabel" name="textLabel3_2_3">
+            <property name="text">
              <string>Gateway:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="3" column="0" >
-           <widget class="QLabel" name="textLabel3_2_3_2" >
-            <property name="text" >
+          <item row="3" column="0">
+           <widget class="QLabel" name="textLabel3_2_3_2">
+            <property name="text">
              <string>IPv6:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="3" column="1" >
-           <widget class="QLabel" name="textIPv6" >
-            <property name="text" >
+          <item row="3" column="1">
+           <widget class="QLabel" name="textIPv6">
+            <property name="text">
              <string/>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="2" column="1" >
-           <widget class="QLabel" name="textGateway" >
-            <property name="text" >
+          <item row="2" column="1">
+           <widget class="QLabel" name="textGateway">
+            <property name="text">
              <string/>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="1" column="1" >
-           <widget class="QLabel" name="textNetmask" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+          <item row="1" column="1">
+           <widget class="QLabel" name="textNetmask">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="text" >
+            <property name="text">
              <string/>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="0" column="1" >
-           <widget class="QLabel" name="textIP" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+          <item row="0" column="1">
+           <widget class="QLabel" name="textIP">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="text" >
+            <property name="text">
              <string/>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="6" column="0" >
-           <widget class="QLabel" name="textLabel3_2_2_2" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+          <item row="6" column="0">
+           <widget class="QLabel" name="textLabel3_2_2_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="text" >
+            <property name="text">
              <string>Status:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="6" column="1" >
-           <widget class="QLabel" name="textStatus" >
-            <property name="text" >
+          <item row="6" column="1">
+           <widget class="QLabel" name="textStatus">
+            <property name="text">
              <string/>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="5" column="1" >
-           <widget class="QLabel" name="textMedia" >
-            <property name="text" >
+          <item row="5" column="1">
+           <widget class="QLabel" name="textMedia">
+            <property name="text">
              <string/>
             </property>
-            <property name="scaledContents" >
+            <property name="scaledContents">
              <bool>true</bool>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>true</bool>
             </property>
            </widget>
           </item>
-          <item row="5" column="0" >
-           <widget class="QLabel" name="textLabel3_2_2_2_3" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Preferred" hsizetype="Minimum" >
+          <item row="5" column="0">
+           <widget class="QLabel" name="textLabel3_2_2_2_3">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
               <horstretch>0</horstretch>
               <verstretch>0</verstretch>
              </sizepolicy>
             </property>
-            <property name="text" >
+            <property name="text">
              <string>Media:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
@@ -579,99 +642,99 @@
          </layout>
         </widget>
        </item>
-       <item row="2" column="0" >
-        <widget class="QGroupBox" name="groupBox5" >
-         <property name="title" >
+       <item row="2" column="0">
+        <widget class="QGroupBox" name="groupBox5">
+         <property name="title">
           <string>Traffic info</string>
          </property>
-         <layout class="QGridLayout" >
-          <item row="1" column="2" >
-           <widget class="QLabel" name="textPacketsOut" >
-            <property name="text" >
+         <layout class="QGridLayout">
+          <item row="1" column="2">
+           <widget class="QLabel" name="textPacketsOut">
+            <property name="text">
              <string/>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="1" column="1" >
-           <widget class="QLabel" name="textPacketsIn" >
-            <property name="text" >
+          <item row="1" column="1">
+           <widget class="QLabel" name="textPacketsIn">
+            <property name="text">
              <string/>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="2" column="2" >
-           <widget class="QLabel" name="textPacketsOutErrors" >
-            <property name="text" >
+          <item row="2" column="2">
+           <widget class="QLabel" name="textPacketsOutErrors">
+            <property name="text">
              <string/>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="2" column="1" >
-           <widget class="QLabel" name="textPacketsInErrors" >
-            <property name="text" >
+          <item row="2" column="1">
+           <widget class="QLabel" name="textPacketsInErrors">
+            <property name="text">
              <string/>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="1" column="0" >
-           <widget class="QLabel" name="textLabel6" >
-            <property name="text" >
+          <item row="1" column="0">
+           <widget class="QLabel" name="textLabel6">
+            <property name="text">
              <string>Packets:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="2" column="0" >
-           <widget class="QLabel" name="textLabel6_2" >
-            <property name="text" >
+          <item row="2" column="0">
+           <widget class="QLabel" name="textLabel6_2">
+            <property name="text">
              <string>Errors:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="0" column="0" >
-           <spacer name="spacer8_2" >
-            <property name="orientation" >
+          <item row="0" column="0">
+           <spacer name="spacer8_2">
+            <property name="orientation">
              <enum>Qt::Vertical</enum>
             </property>
-            <property name="sizeType" >
+            <property name="sizeType">
              <enum>QSizePolicy::Expanding</enum>
             </property>
-            <property name="sizeHint" stdset="0" >
+            <property name="sizeHint" stdset="0">
              <size>
               <width>20</width>
               <height>20</height>
@@ -679,28 +742,28 @@
             </property>
            </spacer>
           </item>
-          <item row="0" column="1" >
-           <widget class="QLabel" name="textLabel5" >
-            <property name="text" >
+          <item row="0" column="1">
+           <widget class="QLabel" name="textLabel5">
+            <property name="text">
              <string>In:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
           </item>
-          <item row="0" column="2" >
-           <widget class="QLabel" name="textLabel5_2" >
-            <property name="text" >
+          <item row="0" column="2">
+           <widget class="QLabel" name="textLabel5_2">
+            <property name="text">
              <string>Out:</string>
             </property>
-            <property name="alignment" >
+            <property name="alignment">
              <set>Qt::AlignCenter</set>
             </property>
-            <property name="wordWrap" >
+            <property name="wordWrap">
              <bool>false</bool>
             </property>
            </widget>
@@ -708,15 +771,15 @@
          </layout>
         </widget>
        </item>
-       <item row="3" column="0" >
-        <spacer name="spacer9" >
-         <property name="orientation" >
+       <item row="3" column="0">
+        <spacer name="spacer9">
+         <property name="orientation">
           <enum>Qt::Vertical</enum>
          </property>
-         <property name="sizeType" >
+         <property name="sizeType">
           <enum>QSizePolicy::Fixed</enum>
          </property>
-         <property name="sizeHint" stdset="0" >
+         <property name="sizeHint" stdset="0">
           <size>
            <width>300</width>
            <height>10</height>
@@ -730,22 +793,14 @@
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
- <customwidgets>
-  <customwidget>
-   <header>QGroupBox</header>
-   <container>1</container>
-  </customwidget>
- </customwidgets>
+ <layoutdefault spacing="6" margin="11"/>
  <tabstops>
   <tabstop>tabMainWidget</tabstop>
   <tabstop>listWifi</tabstop>
   <tabstop>pushUp</tabstop>
   <tabstop>pushDown</tabstop>
-  <tabstop>pushAddWifi</tabstop>
   <tabstop>pushEditWifi</tabstop>
   <tabstop>pushRemoveWifi</tabstop>
-  <tabstop>checkDHCP</tabstop>
   <tabstop>lineIP</tabstop>
   <tabstop>lineNetmask</tabstop>
   <tabstop>checkDisableWireless</tabstop>
@@ -756,20 +811,20 @@
   <tabstop>checkMAC</tabstop>
  </tabstops>
  <includes>
-  <include location="local" >qmessagebox.h</include>
-  <include location="local" >qfile.h</include>
-  <include location="local" >wifiselectiondialog.h</include>
-  <include location="local" >qmessagebox.h</include>
-  <include location="local" >wepconfig.h</include>
-  <include location="local" >dialogwpapersonal.h</include>
-  <include location="local" >dialogwpaenterprise.h</include>
-  <include location="local" >qdesktopwidget.h</include>
-  <include location="local" >qapplication.h</include>
-  <include location="global" >pcbsd-netif.h</include>
-  <include location="global" >pcbsd-utils.h</include>
+  <include location="local">qmessagebox.h</include>
+  <include location="local">qfile.h</include>
+  <include location="local">wifiselectiondialog.h</include>
+  <include location="local">qmessagebox.h</include>
+  <include location="local">wepconfig.h</include>
+  <include location="local">dialogwpapersonal.h</include>
+  <include location="local">dialogwpaenterprise.h</include>
+  <include location="local">qdesktopwidget.h</include>
+  <include location="local">qapplication.h</include>
+  <include location="global">pcbsd-netif.h</include>
+  <include location="global">pcbsd-utils.h</include>
  </includes>
  <resources>
-  <include location="wificonfig.qrc" />
+  <include location="wificonfig.qrc"/>
  </resources>
  <connections>
   <connection>
@@ -778,11 +833,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotClose()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -794,11 +849,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotApply()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -810,11 +865,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotCheckDisabled()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -826,11 +881,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotOK()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -842,11 +897,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotCheckDHCPBox()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -858,11 +913,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotMACClicked()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -874,11 +929,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotCheckGlobalText()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -890,11 +945,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotCheckGlobalText()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>
@@ -906,11 +961,11 @@
    <receiver>wificonfigwidgetbase</receiver>
    <slot>slotCheckGlobalText()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>20</x>
      <y>20</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>20</x>
      <y>20</y>
     </hint>

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiscanssid.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiscanssid.cpp	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiscanssid.cpp	2011-03-24 00:32:37 UTC (rev 9771)
@@ -17,58 +17,6 @@
    connect( pushSelect, SIGNAL( clicked() ), this, SLOT(slotConnect()) );
    connect( pushCancel, SIGNAL( clicked() ), this, SLOT(slotCancel()) );
 }
-
-QString wifiscanssid::getSignalStrengthForIdent( QString ifoutput )
-{
-  // Get the signal strength of this device
-  QString tmp, sig, noise;
-  bool ok, ok2;
-  int isig, inoise, percent;
-	
-  tmp = ifoutput.simplified();
-
-  // Lets find the signal strength / noise variables now
-  tmp.remove(0, tmp.indexOf(":"));
-  tmp.remove(0, tmp.indexOf(" "));
-
-  // Get the noise
-  noise = tmp.simplified();
-  noise.remove(0, noise.indexOf(" "));
-  noise.remove(0, noise.indexOf(" "));
-  noise.remove(0, noise.indexOf(":") + 1);
-  noise.remove(noise.indexOf(" "), noise.size());
-  noise = noise.simplified();
-  if ( noise.indexOf("-") == 0)
-	noise.remove(0, 1);
-
-  // Get the signal
-  sig = tmp.simplified();
-  sig.remove(sig.indexOf(":"), sig.size());
-  sig.remove(0, sig.lastIndexOf(" "));
-  sig = sig.simplified();
-  if ( sig.indexOf("-") == 0)
-	sig.remove(0, 1);
-
-  //qDebug() << "Signal:" << sig << " Noise:" << noise;
-  //QMessageBox::warning( this, "Testing", "signal:" + sig + " noise:" + noise );
-
-  // Now figure out the percentage
-  isig = sig.toInt(&ok);
-  inoise = noise.toInt(&ok2);
-  if ( ok && ok2 ) {
-     percent = (inoise - isig) * 4;
-     // Sanity check
-     if ( percent > 100 )
-	percent = 100;
-     if ( percent < 0 )
-	percent = 0;
-     tmp.setNum(percent);
-  } else {
-     tmp = "";
-  }
-
-  return tmp;	
-}
    
 void wifiscanssid::scanWifi()
 {
@@ -82,7 +30,7 @@
     textTop->setText(tr("Scanning for wireless networks...") );
             
     // Start the scan and get the output
-    ifconfout = Utils::runShellCommand("ifconfig -v " + DeviceName + " list scan");
+    ifconfout = Utils::runShellCommand("ifconfig -v " + DeviceName + " up list scan");
 
     //display the info for each wifi access point
     for(int i=1; i<ifconfout.size(); i++){    //Skip the header line by starting at 1
@@ -150,34 +98,11 @@
     close();
 }
 
-
-
-
 void wifiscanssid::slotRescan()
 {
     pushSelect->setEnabled(FALSE);
     scanWifi();
 }
 
-QString wifiscanssid::getLineFromCommandOutput( QString command )
-{
-        FILE *file = popen(command.toLatin1(),"r");
 
-        char buffer[100];
 
-        QString line = "";
-        char firstChar;
-
-        if ((firstChar = fgetc(file)) != -1){
-                line += firstChar;
-                line += fgets(buffer,100,file);
-        }
-
-
-        pclose(file);
-
-
-        return line;
-}
-
-

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiselectiondialog.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiselectiondialog.cpp	2011-03-23 18:15:23 UTC (rev 9770)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wifiselectiondialog.cpp	2011-03-24 00:32:37 UTC (rev 9771)
@@ -197,7 +197,7 @@
 
 void wifiselectiondialog::slotCheckSecurityRadio()
 {
-    // Check to see which radio button is checked and take approiate actions
+    // Check to see which radio button is checked and take appropriate actions
     
     if ( radioSecurityDisabled->isChecked() )
     {



More information about the Commits mailing list