summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/mainwindowimp.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index a0b3113..4119490 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -474,49 +474,49 @@ void MainWindowImp::updateInterface(Interface *i){
474 474
475 // Find the interface, making it if needed. 475 // Find the interface, making it if needed.
476 if(items.find(i) == items.end()){ 476 if(items.find(i) == items.end()){
477 item = new QListViewItem(connectionList, "", "", ""); 477 item = new QListViewItem(connectionList, "", "", "");
478 // See if you can't find a module owner for this interface 478 // See if you can't find a module owner for this interface
479 QMap<Module*, QLibrary*>::Iterator it; 479 QMap<Module*, QLibrary*>::Iterator it;
480 for( it = libraries.begin(); it != libraries.end(); ++it ){ 480 for( it = libraries.begin(); it != libraries.end(); ++it ){
481 if(it.key()->isOwner(i)) 481 if(it.key()->isOwner(i))
482 i->setModuleOwner(it.key()); 482 i->setModuleOwner(it.key());
483 } 483 }
484 items.insert(i, item); 484 items.insert(i, item);
485 interfaceItems.insert(item, i); 485 interfaceItems.insert(item, i);
486 } 486 }
487 else 487 else
488 item = items[i]; 488 item = items[i];
489 489
490 // Update the icons and information 490 // Update the icons and information
491#ifdef QWS 491#ifdef QWS
492 item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down"))); 492 item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down")));
493#else 493#else
494 item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down"))); 494 item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down")));
495#endif 495#endif
496 496
497 QString typeName = "lan"; 497 QString typeName = "lan";
498 if(i->getHardwareName().contains("Local Loopback")) 498 if(i->getInterfaceName() == "lo")
499 typeName = "lo"; 499 typeName = "lo";
500 if(i->getInterfaceName().contains("irda")) 500 if(i->getInterfaceName().contains("irda"))
501 typeName = "irda"; 501 typeName = "irda";
502 if(i->getInterfaceName().contains("wlan")) 502 if(i->getInterfaceName().contains("wlan"))
503 typeName = "wlan"; 503 typeName = "wlan";
504 if(i->getInterfaceName().contains("usb")) 504 if(i->getInterfaceName().contains("usb"))
505 typeName = "usb"; 505 typeName = "usb";
506 506
507 if(!i->isAttached()) 507 if(!i->isAttached())
508 typeName = "connect_no"; 508 typeName = "connect_no";
509 // Actually try to use the Module 509 // Actually try to use the Module
510 if(i->getModuleOwner() != NULL) 510 if(i->getModuleOwner() != NULL)
511 typeName = i->getModuleOwner()->getPixmapName(i); 511 typeName = i->getModuleOwner()->getPixmapName(i);
512 512
513#ifdef QWS 513#ifdef QWS
514 item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName))); 514 item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName)));
515#else 515#else
516 item->setPixmap(1, (SmallIcon(typeName))); 516 item->setPixmap(1, (SmallIcon(typeName)));
517#endif 517#endif
518 item->setText(2, i->getHardwareName()); 518 item->setText(2, i->getHardwareName());
519 item->setText(3, QString("(%1)").arg(i->getInterfaceName())); 519 item->setText(3, QString("(%1)").arg(i->getInterfaceName()));
520 item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); 520 item->setText(4, (i->getStatus()) ? i->getIp() : QString(""));
521} 521}
522 522