Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index b9fff56..6440bd4 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -229,16 +229,10 @@ void MainWindowImp::configureClicked(){ | |||
229 | QMessageBox::information(this, "Sorry","Please select an interface first.", QMessageBox::Ok); | 229 | QMessageBox::information(this, "Sorry","Please select an interface first.", QMessageBox::Ok); |
230 | return; | 230 | return; |
231 | } | 231 | } |
232 | 232 | ||
233 | QString currentProfile = currentProfileLabel->text(); | ||
234 | if(profilesList->count() <= 1 || currentProfile == "All"){ | ||
235 | currentProfile = ""; | ||
236 | } | ||
237 | |||
238 | Interface *i = interfaceItems[item]; | 233 | Interface *i = interfaceItems[item]; |
239 | if(i->getModuleOwner()){ | 234 | if(i->getModuleOwner()){ |
240 | i->getModuleOwner()->setProfile(currentProfile); | ||
241 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); | 235 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); |
242 | if(moduleConfigure != NULL){ | 236 | if(moduleConfigure != NULL){ |
243 | moduleConfigure->showMaximized(); | 237 | moduleConfigure->showMaximized(); |
244 | moduleConfigure->show(); | 238 | moduleConfigure->show(); |
@@ -246,9 +240,12 @@ void MainWindowImp::configureClicked(){ | |||
246 | } | 240 | } |
247 | } | 241 | } |
248 | 242 | ||
249 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose); | 243 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose); |
250 | //configure->setProfile(currentProfile); | 244 | QString currentProfileText = currentProfileLabel->text(); |
245 | if(currentProfileText.upper() == "ALL"); | ||
246 | currentProfileText = ""; | ||
247 | configure->setProfile(currentProfileText); | ||
251 | configure->showMaximized(); | 248 | configure->showMaximized(); |
252 | configure->show(); | 249 | configure->show(); |
253 | } | 250 | } |
254 | 251 | ||
@@ -269,13 +266,8 @@ void MainWindowImp::informationClicked(){ | |||
269 | QMessageBox::information(this, "Sorry","No information about\na disconnected interface.", QMessageBox::Ok); | 266 | QMessageBox::information(this, "Sorry","No information about\na disconnected interface.", QMessageBox::Ok); |
270 | return; | 267 | return; |
271 | } | 268 | } |
272 | 269 | ||
273 | QStringList list; | ||
274 | for(uint i = 0; i < profilesList->count(); i++){ | ||
275 | list.append(profilesList->text(i)); | ||
276 | } | ||
277 | |||
278 | if(i->getModuleOwner()){ | 270 | if(i->getModuleOwner()){ |
279 | QWidget *moduleInformation = i->getModuleOwner()->information(i); | 271 | QWidget *moduleInformation = i->getModuleOwner()->information(i); |
280 | if(moduleInformation != NULL){ | 272 | if(moduleInformation != NULL){ |
281 | moduleInformation->showMaximized(); | 273 | moduleInformation->showMaximized(); |
@@ -537,8 +529,9 @@ void MainWindowImp::changeProfile(){ | |||
537 | it.key()->restart(); | 529 | it.key()->restart(); |
538 | } | 530 | } |
539 | } | 531 | } |
540 | } | 532 | } |
533 | // TODO change the profile in the modules | ||
541 | } | 534 | } |
542 | 535 | ||
543 | // mainwindowimp.cpp | 536 | // mainwindowimp.cpp |
544 | 537 | ||