author | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 17:14:54 (UTC) |
commit | a7e015198a8c5ad3b6e144a9032b059086253e00 (patch) (unidiff) | |
tree | b712b6f11310d88744fe393a92b3160b741a7efe /noncore/settings/networksettings/wlan/wlanimp2.cpp | |
parent | beba0e73306815337bf04dee39502233595e9739 (diff) | |
download | opie-a7e015198a8c5ad3b6e144a9032b059086253e00.zip opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.gz opie-a7e015198a8c5ad3b6e144a9032b059086253e00.tar.bz2 |
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp2.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index cdafb4d..26e3aa9 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp | |||
@@ -29,3 +29,3 @@ | |||
29 | */ | 29 | */ |
30 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), currentProfile("*"), interface(i) { | 30 | WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), interface(i), currentProfile("*") { |
31 | interfaces = new Interfaces(); | 31 | interfaces = new Interfaces(); |
@@ -69,10 +69,5 @@ void WLANImp::parseOpts() { | |||
69 | opt = interfaces->getInterfaceOption("wireless_mode", error).simplifyWhiteSpace(); | 69 | opt = interfaces->getInterfaceOption("wireless_mode", error).simplifyWhiteSpace(); |
70 | if (opt == "Auto") { | 70 | |
71 | mode->setCurrentItem(0); | 71 | for ( int i = 0; i < mode->count(); i++) |
72 | } else if (opt == "Ad-Hoc") { | 72 | if ( mode->text( i ) == opt ) mode->setCurrentItem( i ); |
73 | mode->setCurrentItem(2); | ||
74 | } else { | ||
75 | // Managed/Infrastructure mode | ||
76 | mode->setCurrentItem(1); | ||
77 | } | ||
78 | 73 | ||
@@ -205,3 +200,3 @@ void WLANImp::accept() { | |||
205 | // Close out the dialog | 200 | // Close out the dialog |
206 | QDialog::accept(); | 201 | // FIXME: QDialog::accept(); |
207 | } | 202 | } |
@@ -209,4 +204,13 @@ void WLANImp::accept() { | |||
209 | void WLANImp::writeOpts() { | 204 | void WLANImp::writeOpts() { |
205 | // eh can't really do anything about it other then return. :-D | ||
206 | if(!interfaces->isInterfaceSet()){ | ||
207 | QMessageBox::warning(0,"Inface not set","should not happen!!!"); | ||
208 | return; | ||
209 | } | ||
210 | bool error = false; | 210 | bool error = false; |
211 | 211 | ||
212 | qDebug("setting wlan interface %s", interfaces->getInterfaceName( error ).latin1() ); | ||
213 | |||
214 | if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!"); | ||
215 | |||
212 | interfaces->setInterfaceOption(QString("wireless_mode"), mode->currentText()); | 216 | interfaces->setInterfaceOption(QString("wireless_mode"), mode->currentText()); |
@@ -232,9 +236,12 @@ void WLANImp::writeOpts() { | |||
232 | keyList += "[1]"; | 236 | keyList += "[1]"; |
233 | } else if (! keyLineEdit1->text().isNull()) { | 237 | } //else |
238 | if (! keyLineEdit1->text().isNull()) { | ||
234 | keyList += keyLineEdit1->text(); | 239 | keyList += keyLineEdit1->text(); |
235 | keyList += "[2]"; | 240 | keyList += "[2]"; |
236 | } else if (! keyLineEdit2->text().isNull()) { | 241 | } //else |
242 | if (! keyLineEdit2->text().isNull()) { | ||
237 | keyList += keyLineEdit2->text(); | 243 | keyList += keyLineEdit2->text(); |
238 | keyList += "[3]"; | 244 | keyList += "[3]"; |
239 | } else if (! keyLineEdit3->text().isNull()) { | 245 | } //else |
246 | if (! keyLineEdit3->text().isNull()) { | ||
240 | keyList += keyLineEdit3->text(); | 247 | keyList += keyLineEdit3->text(); |