From: Jouni Malinen Date: Sat, 21 Nov 2009 18:52:55 +0000 (+0200) Subject: wpa_gui: Only move to WPS tab if inactive/disconnect and AP ready X-Git-Tag: hostap_0_7_0~5 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=libeap.git;a=commitdiff_plain;h=19019a84a24fd3f1f49ca3296fa24626b403a607 wpa_gui: Only move to WPS tab if inactive/disconnect and AP ready This removes many of the cases where moving to the WPS tab can be undesired. It is really only useful if we are not currently connected and there is an AP available that would likely be able to provide us network connectivity with use of WPS (active PBC more or selected registrar set). --- diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp index c0c207c..fb7d747 100644 --- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp +++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp @@ -869,7 +869,9 @@ void WpaGui::processMsg(char *msg) "Wi-Fi Protected Setup (WPS) AP\n" "in active PBC mode found."); wpsStatusText->setText("WPS AP in active PBC mode found"); - wpaguiTab->setCurrentWidget(wpsTab); + if (textStatus->text() == "INACTIVE" || + textStatus->text() == "DISCONNECTED") + wpaguiTab->setCurrentWidget(wpsTab); wpsInstructions->setText("Press the PBC button on the screen " "to start registration"); } else if (str_match(pos, WPS_EVENT_AP_AVAILABLE_PIN)) { @@ -878,13 +880,14 @@ void WpaGui::processMsg(char *msg) " in active PIN mode found."); wpsStatusText->setText("WPS AP with recently selected " "registrar"); - wpaguiTab->setCurrentWidget(wpsTab); + if (textStatus->text() == "INACTIVE" || + textStatus->text() == "DISCONNECTED") + wpaguiTab->setCurrentWidget(wpsTab); } else if (str_match(pos, WPS_EVENT_AP_AVAILABLE)) { showTrayMessage(QSystemTrayIcon::Information, 3, "Wi-Fi Protected Setup (WPS)\n" "AP detected."); wpsStatusText->setText("WPS AP detected"); - wpaguiTab->setCurrentWidget(wpsTab); } else if (str_match(pos, WPS_EVENT_OVERLAP)) { showTrayMessage(QSystemTrayIcon::Information, 3, "Wi-Fi Protected Setup (WPS)\n"