[PC-BSD Commits] r16429 - pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray

svn at pcbsd.org svn at pcbsd.org
Mon Apr 16 07:22:57 PDT 2012


Author: kenmoore
Date: 2012-04-16 14:22:56 +0000 (Mon, 16 Apr 2012)
New Revision: 16429

Modified:
   pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/NetworkTray.cpp
Log:
Fix an issue with the wireless tray showing empty ssid entry points



Modified: pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/NetworkTray.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/NetworkTray.cpp	2012-04-16 10:44:17 UTC (rev 16428)
+++ pcbsd/current/src-qt4/pc-netmanager/src/NetworkTray/NetworkTray.cpp	2012-04-16 14:22:56 UTC (rev 16429)
@@ -647,6 +647,9 @@
     }else{
       ssidIcon = iconLocked;
     }
+    //Make sure there is an ssid (don't show blank entry points)
+    if( !ssid.isEmpty() ){
+
     //Check for duplicate SSID entries
     bool duplicateSSID = FALSE;
     int dupRow;
@@ -670,14 +673,15 @@
     }else{
       //Check if the new signal strength is greater, replace if it is
       QString oldStrength = trayIconMenu->actions()[dupRow]->text();
-      oldStrength = oldStrength.section("(signal:",1,1).section("%)",0,0).simplified();
+      oldStrength = oldStrength.section("(",1,1).section("%)",0,0).simplified();
       if( strength.section("%",0,0).toInt() > oldStrength.toInt() ){
         //New signal strength is greater - replace the string
         //qDebug() << "Changing signal strength for "+ssid+" to reflect a stronger signal found";
         //qDebug() << strength << oldStrength;
-        trayIconMenu->actions()[dupRow]->setText( ssid+" (signal: "+strength+")" );
+        trayIconMenu->actions()[dupRow]->setText( ssid+" ("+strength+")" );
       }
     }
+    } //end of the empty ssid check
   }
   //Connect the actionGroup signal with slotQuickConnect
   QObject::connect(trayActionGroup, SIGNAL(triggered(QAction*)),this,SLOT(slotGetNetKey(QAction*)));



More information about the Commits mailing list