wpa_gui-qt4: add status fields to tray message
authorKel Modderman <kel@otaku42.de>
Thu, 25 Sep 2008 18:06:32 +0000 (21:06 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 25 Sep 2008 18:06:32 +0000 (21:06 +0300)
Add extra state status fields to the tray icon message bubble. Do not
display an empty message.

Signed-off-by: Kel Modderman <kel@otaku42.de>
wpa_supplicant/wpa_gui-qt4/wpagui.cpp

index 6280e72..ba11a83 100644 (file)
@@ -1203,11 +1203,18 @@ void WpaGui::showTrayStatus()
                        msg.append("GROUP:\t" + (*it).mid(pos) + "\n");
                else if ((*it).startsWith("key_mgmt="))
                        msg.append("AUTH: \t" + (*it).mid(pos) + "\n");
+               else if ((*it).startsWith("wpa_state="))
+                       msg.append("STATE:\t" + (*it).mid(pos) + "\n");
                else if ((*it).startsWith("ip_address="))
                        msg.append("IP:   \t" + (*it).mid(pos) + "\n");
+               else if ((*it).startsWith("Supplicant PAE state="))
+                       msg.append("PAE:  \t" + (*it).mid(pos) + "\n");
+               else if ((*it).startsWith("EAP state="))
+                       msg.append("EAP:  \t" + (*it).mid(pos) + "\n");
        }
 
-       showTrayMessage(QSystemTrayIcon::Information, 10, msg);
+       if (!msg.isEmpty())
+               showTrayMessage(QSystemTrayIcon::Information, 10, msg);
 }
 
 void WpaGui::fileExit()