aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-02-01 20:02:32 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 10:28:41 (GMT)
commit4786b13b0b2051af53184bc2ce7cff51ceaa02d3 (patch)
tree2c18913946938f9b528b55b89440926e7ce6848c /wpa_supplicant
parent3cbcc5ef9fca4371341a8605790a473af49f0040 (diff)
downloadhostap-06-4786b13b0b2051af53184bc2ce7cff51ceaa02d3.zip
hostap-06-4786b13b0b2051af53184bc2ce7cff51ceaa02d3.tar.gz
hostap-06-4786b13b0b2051af53184bc2ce7cff51ceaa02d3.tar.bz2
wpa_gui-qt4: Disable WPS tab in the same way as the menu item
Disable by default and only enable if the running wpa_supplicant has support for WPS. This is based on a patch from Kel Modderman <kel@otaku42.de>. (cherry picked from commit 97642d73ee12d4956c97989c9e407e9e64698f23)
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index 082166f..dcd33b9 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -73,6 +73,13 @@ WpaGui::WpaGui(QApplication *_app, QWidget *parent, const char *, Qt::WFlags)
(void) statusBar();
+ /*
+ * Disable WPS tab by default; it will be enabled if wpa_supplicant is
+ * built with WPS support.
+ */
+ wpsTab->setEnabled(false);
+ wpaguiTab->setTabEnabled(wpaguiTab->indexOf(wpsTab), false);
+
connect(fileEventHistoryAction, SIGNAL(triggered()), this,
SLOT(eventHistory()));
connect(fileSaveConfigAction, SIGNAL(triggered()), this,
@@ -416,8 +423,10 @@ int WpaGui::openCtrlConnection(const char *ifname)
QString res(buf);
QStringList types = res.split(QChar(' '));
- actionWPS->setEnabled(types.contains("WSC"));
- wpsTab->setEnabled(types.contains("WSC"));
+ bool wps = types.contains("WSC");
+ actionWPS->setEnabled(wps);
+ wpsTab->setEnabled(wps);
+ wpaguiTab->setTabEnabled(wpaguiTab->indexOf(wpsTab), wps);
}
return 0;