summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/wlan/wlanimp.cpp
Unidiff
Diffstat (limited to 'noncore/net/networksetup/wlan/wlanimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp
index e64a633..87a9716 100644
--- a/noncore/net/networksetup/wlan/wlanimp.cpp
+++ b/noncore/net/networksetup/wlan/wlanimp.cpp
@@ -179,49 +179,48 @@ void WLANImp::changeAndSaveSettingFile(){
179 if(keyRadio0->isChecked()) stream << "1]"; 179 if(keyRadio0->isChecked()) stream << "1]";
180 if(keyRadio1->isChecked()) stream << "2]"; 180 if(keyRadio1->isChecked()) stream << "2]";
181 if(keyRadio2->isChecked()) stream << "3]"; 181 if(keyRadio2->isChecked()) stream << "3]";
182 if(keyRadio3->isChecked()) stream << "4]"; 182 if(keyRadio3->isChecked()) stream << "4]";
183 if(authOpen->isChecked()) stream << " open"; 183 if(authOpen->isChecked()) stream << " open";
184 stream << "\n"; 184 stream << "\n";
185 stream << "\tCHANNEL=" << networkChannel->value() << "\n"; 185 stream << "\tCHANNEL=" << networkChannel->value() << "\n";
186 stream << "\tRATE=auto\n"; 186 stream << "\tRATE=auto\n";
187 if(line.contains("esac")) 187 if(line.contains("esac"))
188 stream << line << "\n"; 188 stream << line << "\n";
189 } 189 }
190 if(line.contains(";;")) 190 if(line.contains(";;"))
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 */
202void WLANImp::accept(){ 202void WLANImp::accept(){
203 printf( "Accept pressed\n" );
204 if(wepEnabled->isChecked()){ 203 if(wepEnabled->isChecked()){
205 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) 204 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() )
206 { 205 {
207 QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok); 206 QMessageBox::information(this, "", "Please enter a key for WEP.", QMessageBox::Ok);
208 return; 207 return;
209 } 208 }
210 } 209 }
211 210
212 // Ok settings are good here, save 211 // Ok settings are good here, save
213 changeAndSaveSettingFile(); 212 changeAndSaveSettingFile();
214 213
215 // Try to save the interfaces settings. 214 // Try to save the interfaces settings.
216 if(!interfaceSetup->saveChanges()) 215 if(!interfaceSetup->saveChanges())
217 return; 216 return;
218 217
219 // Restart the device now that the settings have changed 218 // Restart the device now that the settings have changed
220 QString initpath; 219 QString initpath;
221 if( QDir("/etc/rc.d/init.d").exists() ) 220 if( QDir("/etc/rc.d/init.d").exists() )
222 initpath = "/etc/rc.d/init.d"; 221 initpath = "/etc/rc.d/init.d";
223 else if( QDir("/etc/init.d").exists() ) 222 else if( QDir("/etc/init.d").exists() )
224 initpath = "/etc/init.d"; 223 initpath = "/etc/init.d";
225 if( initpath ) 224 if( initpath )
226 system(QString("%1/pcmcia stop").arg(initpath)); 225 system(QString("%1/pcmcia stop").arg(initpath));
227 if( initpath ) 226 if( initpath )