-rw-r--r-- | noncore/net/networksetup/wlan/wlanimp.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp index d4b4af9..e64a633 100644 --- a/noncore/net/networksetup/wlan/wlanimp.cpp +++ b/noncore/net/networksetup/wlan/wlanimp.cpp | |||
@@ -191,29 +191,32 @@ void WLANImp::changeAndSaveSettingFile(){ | |||
191 | output = true; | 191 | output = true; |
192 | if(output) | 192 | if(output) |
193 | stream << (*it) << '\n'; | 193 | stream << (*it) << '\n'; |
194 | } | 194 | } |
195 | file.close(); | 195 | file.close(); |
196 | } | 196 | } |
197 | 197 | ||
198 | /** | 198 | /** |
199 | * Check to see if the current config is valid | 199 | * Check to see if the current config is valid |
200 | * Save wireless.opts, save interfaces | 200 | * Save wireless.opts, save interfaces |
201 | */ | 201 | */ |
202 | void WLANImp::accept(){ | 202 | void WLANImp::accept(){ |
203 | printf( "Accept pressed\n" ); | ||
203 | if(wepEnabled->isChecked()){ | 204 | if(wepEnabled->isChecked()){ |
204 | if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) | 205 | if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) |
206 | { | ||
205 | QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok); | 207 | QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok); |
206 | return; | 208 | return; |
207 | } | 209 | } |
210 | } | ||
208 | 211 | ||
209 | // Ok settings are good here, save | 212 | // Ok settings are good here, save |
210 | changeAndSaveSettingFile(); | 213 | changeAndSaveSettingFile(); |
211 | 214 | ||
212 | // Try to save the interfaces settings. | 215 | // Try to save the interfaces settings. |
213 | if(!interfaceSetup->saveChanges()) | 216 | if(!interfaceSetup->saveChanges()) |
214 | return; | 217 | return; |
215 | 218 | ||
216 | // Restart the device now that the settings have changed | 219 | // Restart the device now that the settings have changed |
217 | QString initpath; | 220 | QString initpath; |
218 | if( QDir("/etc/rc.d/init.d").exists() ) | 221 | if( QDir("/etc/rc.d/init.d").exists() ) |
219 | initpath = "/etc/rc.d/init.d"; | 222 | initpath = "/etc/rc.d/init.d"; |
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index d4b4af9..e64a633 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp | |||
@@ -191,29 +191,32 @@ void WLANImp::changeAndSaveSettingFile(){ | |||
191 | output = true; | 191 | output = true; |
192 | if(output) | 192 | if(output) |
193 | stream << (*it) << '\n'; | 193 | stream << (*it) << '\n'; |
194 | } | 194 | } |
195 | file.close(); | 195 | file.close(); |
196 | } | 196 | } |
197 | 197 | ||
198 | /** | 198 | /** |
199 | * Check to see if the current config is valid | 199 | * Check to see if the current config is valid |
200 | * Save wireless.opts, save interfaces | 200 | * Save wireless.opts, save interfaces |
201 | */ | 201 | */ |
202 | void WLANImp::accept(){ | 202 | void WLANImp::accept(){ |
203 | printf( "Accept pressed\n" ); | ||
203 | if(wepEnabled->isChecked()){ | 204 | if(wepEnabled->isChecked()){ |
204 | if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) | 205 | if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) |
206 | { | ||
205 | QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok); | 207 | QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok); |
206 | return; | 208 | return; |
207 | } | 209 | } |
210 | } | ||
208 | 211 | ||
209 | // Ok settings are good here, save | 212 | // Ok settings are good here, save |
210 | changeAndSaveSettingFile(); | 213 | changeAndSaveSettingFile(); |
211 | 214 | ||
212 | // Try to save the interfaces settings. | 215 | // Try to save the interfaces settings. |
213 | if(!interfaceSetup->saveChanges()) | 216 | if(!interfaceSetup->saveChanges()) |
214 | return; | 217 | return; |
215 | 218 | ||
216 | // Restart the device now that the settings have changed | 219 | // Restart the device now that the settings have changed |
217 | QString initpath; | 220 | QString initpath; |
218 | if( QDir("/etc/rc.d/init.d").exists() ) | 221 | if( QDir("/etc/rc.d/init.d").exists() ) |
219 | initpath = "/etc/rc.d/init.d"; | 222 | initpath = "/etc/rc.d/init.d"; |