summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/wlan/wlanimp.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/networksetup/wlan/wlanimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp
index 120d4e5..84e0bae 100644
--- a/noncore/net/networksetup/wlan/wlanimp.cpp
+++ b/noncore/net/networksetup/wlan/wlanimp.cpp
@@ -39,13 +39,12 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
settingsFileText = QStringList::split("\n", line, true);
parseSettingFile();
}
else
qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1());
connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
-
}
void WLANImp::typeChanged(int mod){
networkChannel->setEnabled(mod);
channelLabel->setEnabled(mod);
}
@@ -87,15 +86,19 @@ void WLANImp::parseSettingFile(){
}
}
if(line.contains("MODE=")){
QString mode = line.mid(line.find("MODE=")+5, line.length());
if(mode == "Managed"){
networkType->setCurrentItem(0);
+ channelLabel->setEnabled(false);
+ networkChannel->setEnabled(false);
}
else{
- networkType->setCurrentItem(0);
+ networkType->setCurrentItem(1);
+ networkChannel->setEnabled(true);
+ channelLabel->setEnabled(true);
}
}
if(line.contains("KEY0="))
keyLineEdit0->setText(line.mid(5, line.length()));
if(line.contains("KEY1="))
keyLineEdit1->setText(line.mid(5, line.length()));