-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index da21c05..765b522 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -372,97 +372,97 @@ void MainWindowImp::configureClicked(){ | |||
372 | return; | 372 | return; |
373 | } | 373 | } |
374 | 374 | ||
375 | Interface *i = interfaceItems[item]; | 375 | Interface *i = interfaceItems[item]; |
376 | if(i->getModuleOwner()){ | 376 | if(i->getModuleOwner()){ |
377 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); | 377 | QWidget *moduleConfigure = i->getModuleOwner()->configure(i); |
378 | if(moduleConfigure != NULL){ | 378 | if(moduleConfigure != NULL){ |
379 | moduleConfigure->showMaximized(); | 379 | moduleConfigure->showMaximized(); |
380 | return; | 380 | return; |
381 | } | 381 | } |
382 | } | 382 | } |
383 | 383 | ||
384 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose ); | 384 | InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose ); |
385 | QString currentProfileText = currentProfileLabel->text(); | 385 | QString currentProfileText = currentProfileLabel->text(); |
386 | if(currentProfileText.upper() == "ALL"); | 386 | if(currentProfileText.upper() == "ALL"); |
387 | currentProfileText = ""; | 387 | currentProfileText = ""; |
388 | configure->setProfile(currentProfileText); | 388 | configure->setProfile(currentProfileText); |
389 | configure->showMaximized(); | 389 | configure->showMaximized(); |
390 | } | 390 | } |
391 | 391 | ||
392 | /** | 392 | /** |
393 | * Pull up the information about the currently selected interface. | 393 | * Pull up the information about the currently selected interface. |
394 | * Report an error if no interface is selected. | 394 | * Report an error if no interface is selected. |
395 | * If the interface has a module owner then request its configure. | 395 | * If the interface has a module owner then request its configure. |
396 | */ | 396 | */ |
397 | void MainWindowImp::informationClicked(){ | 397 | void MainWindowImp::informationClicked(){ |
398 | QListViewItem *item = connectionList->currentItem(); | 398 | QListViewItem *item = connectionList->currentItem(); |
399 | if(!item){ | 399 | if(!item){ |
400 | QMessageBox::information(this, "Sorry","Please select an interface First.", QMessageBox::Ok); | 400 | QMessageBox::information(this, "Sorry","Please select an interface First.", QMessageBox::Ok); |
401 | return; | 401 | return; |
402 | } | 402 | } |
403 | 403 | ||
404 | Interface *i = interfaceItems[item]; | 404 | Interface *i = interfaceItems[item]; |
405 | if(!i->isAttached()){ | 405 | if(!i->isAttached()){ |
406 | QMessageBox::information(this, "Sorry","No information about\na disconnected interface.", QMessageBox::Ok); | 406 | QMessageBox::information(this, "Sorry","No information about\na disconnected interface.", QMessageBox::Ok); |
407 | return; | 407 | return; |
408 | } | 408 | } |
409 | 409 | ||
410 | if(i->getModuleOwner()){ | 410 | if(i->getModuleOwner()){ |
411 | QWidget *moduleInformation = i->getModuleOwner()->information(i); | 411 | QWidget *moduleInformation = i->getModuleOwner()->information(i); |
412 | if(moduleInformation != NULL){ | 412 | if(moduleInformation != NULL){ |
413 | moduleInformation->showMaximized(); | 413 | moduleInformation->showMaximized(); |
414 | #ifdef DEBUG | 414 | #ifdef DEBUG |
415 | qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); | 415 | qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); |
416 | #endif | 416 | #endif |
417 | return; | 417 | return; |
418 | } | 418 | } |
419 | } | 419 | } |
420 | InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WType_Dialog); | 420 | InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog); |
421 | information->showMaximized(); | 421 | information->showMaximized(); |
422 | } | 422 | } |
423 | 423 | ||
424 | /** | 424 | /** |
425 | * Update this interface. If no QListViewItem exists create one. | 425 | * Update this interface. If no QListViewItem exists create one. |
426 | * @param Interface* pointer to the interface that needs to be updated. | 426 | * @param Interface* pointer to the interface that needs to be updated. |
427 | */ | 427 | */ |
428 | void MainWindowImp::updateInterface(Interface *i){ | 428 | void MainWindowImp::updateInterface(Interface *i){ |
429 | if(!advancedUserMode){ | 429 | if(!advancedUserMode){ |
430 | if(i->getInterfaceName() == "lo") | 430 | if(i->getInterfaceName() == "lo") |
431 | return; | 431 | return; |
432 | } | 432 | } |
433 | 433 | ||
434 | QListViewItem *item = NULL; | 434 | QListViewItem *item = NULL; |
435 | 435 | ||
436 | // Find the interface, making it if needed. | 436 | // Find the interface, making it if needed. |
437 | if(items.find(i) == items.end()){ | 437 | if(items.find(i) == items.end()){ |
438 | item = new QListViewItem(connectionList, "", "", ""); | 438 | item = new QListViewItem(connectionList, "", "", ""); |
439 | // See if you can't find a module owner for this interface | 439 | // See if you can't find a module owner for this interface |
440 | QMap<Module*, QLibrary*>::Iterator it; | 440 | QMap<Module*, QLibrary*>::Iterator it; |
441 | for( it = libraries.begin(); it != libraries.end(); ++it ){ | 441 | for( it = libraries.begin(); it != libraries.end(); ++it ){ |
442 | if(it.key()->isOwner(i)) | 442 | if(it.key()->isOwner(i)) |
443 | i->setModuleOwner(it.key()); | 443 | i->setModuleOwner(it.key()); |
444 | } | 444 | } |
445 | items.insert(i, item); | 445 | items.insert(i, item); |
446 | interfaceItems.insert(item, i); | 446 | interfaceItems.insert(item, i); |
447 | } | 447 | } |
448 | else | 448 | else |
449 | item = items[i]; | 449 | item = items[i]; |
450 | 450 | ||
451 | // Update the icons and information | 451 | // Update the icons and information |
452 | #ifdef QWS | 452 | #ifdef QWS |
453 | item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down"))); | 453 | item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down"))); |
454 | #else | 454 | #else |
455 | item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down"))); | 455 | item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down"))); |
456 | #endif | 456 | #endif |
457 | 457 | ||
458 | QString typeName = "lan"; | 458 | QString typeName = "lan"; |
459 | if(i->getHardwareName().contains("Local Loopback")) | 459 | if(i->getHardwareName().contains("Local Loopback")) |
460 | typeName = "lo"; | 460 | typeName = "lo"; |
461 | if(i->getInterfaceName().contains("irda")) | 461 | if(i->getInterfaceName().contains("irda")) |
462 | typeName = "irda"; | 462 | typeName = "irda"; |
463 | if(i->getInterfaceName().contains("wlan")) | 463 | if(i->getInterfaceName().contains("wlan")) |
464 | typeName = "wlan"; | 464 | typeName = "wlan"; |
465 | if(i->getInterfaceName().contains("usb")) | 465 | if(i->getInterfaceName().contains("usb")) |
466 | typeName = "usb"; | 466 | typeName = "usb"; |
467 | 467 | ||
468 | if(!i->isAttached()) | 468 | if(!i->isAttached()) |