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 | |||
@@ -225,34 +225,31 @@ void MainWindowImp::removeClicked(){ | |||
225 | */ | 225 | */ |
226 | void MainWindowImp::configureClicked(){ | 226 | void MainWindowImp::configureClicked(){ |
227 | QListViewItem *item = connectionList->currentItem(); | 227 | QListViewItem *item = connectionList->currentItem(); |
228 | if(!item){ | 228 | if(!item){ |
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(); |
245 | return; | 239 | return; |
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 | ||
255 | /** | 252 | /** |
256 | * Pull up the information about the currently selected interface. | 253 | * Pull up the information about the currently selected interface. |
257 | * Report an error if no interface is selected. | 254 | * Report an error if no interface is selected. |
258 | * If the interface has a module owner then request its configure. | 255 | * If the interface has a module owner then request its configure. |
@@ -265,21 +262,16 @@ void MainWindowImp::informationClicked(){ | |||
265 | } | 262 | } |
266 | 263 | ||
267 | Interface *i = interfaceItems[item]; | 264 | Interface *i = interfaceItems[item]; |
268 | if(!i->isAttached()){ | 265 | if(!i->isAttached()){ |
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(); |
282 | moduleInformation->show(); | 274 | moduleInformation->show(); |
283 | return; | 275 | return; |
284 | } | 276 | } |
285 | } | 277 | } |
@@ -533,12 +525,13 @@ void MainWindowImp::changeProfile(){ | |||
533 | // Go through them one by one | 525 | // Go through them one by one |
534 | QMap<Interface*, QListViewItem*>::Iterator it; | 526 | QMap<Interface*, QListViewItem*>::Iterator it; |
535 | for( it = items.begin(); it != items.end(); ++it ){ | 527 | for( it = items.begin(); it != items.end(); ++it ){ |
536 | if(it.key()->getStatus() == true) | 528 | if(it.key()->getStatus() == true) |
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 | ||