From b86723182311fa621451c2641acf62b3b89dceeb Mon Sep 17 00:00:00 2001 From: drw Date: Wed, 15 Jun 2005 19:04:33 +0000 Subject: Resource -> OResource and fix compiler warning --- (limited to 'noncore/settings/networksettings/mainwindow') diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp index a7b0bdc..650e634 100644 --- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp @@ -9,12 +9,13 @@ /* OPIE */ #include #include +#include + #include #include #include #include #include -#include /* QT */ #include @@ -532,13 +533,7 @@ void MainWindowImp::updateInterface(Interface *i) item = items[i]; // Update the icons and information -#ifdef QWS - QPixmap pic; - pic.convertFromImage( Resource::loadImage( i->getStatus() ? "up": "down" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); - item->setPixmap(0, ( pic )); -#else - item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down"))); -#endif + item->setPixmap( 0, Opie::Core::OResource::loadPixmap( i->getStatus() ? "up" : "down", Opie::Core::OResource::SmallIcon ) ); QString typeName = "lan"; if(i->getInterfaceName() == "lo") @@ -556,11 +551,8 @@ void MainWindowImp::updateInterface(Interface *i) if(i->getModuleOwner() != NULL) typeName = i->getModuleOwner()->getPixmapName(i); -#ifdef QWS - item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName))); -#else - item->setPixmap(1, (SmallIcon(typeName))); -#endif + item->setPixmap( 1, ( Opie::Core::OResource::loadPixmap( "networksettings/" + typeName, Opie::Core::OResource::SmallIcon ) ) ); + item->setText(2, i->getHardwareName()); item->setText(3, QString("(%1)").arg(i->getInterfaceName())); item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); @@ -782,7 +774,7 @@ void MainWindowImp::initHostname() _procTemp=""; } -void MainWindowImp::slotHostname(Opie::Core::OProcess *proc, char *buffer, int buflen) +void MainWindowImp::slotHostname(Opie::Core::OProcess */*proc*/, char *buffer, int buflen) { if (buflen < 1 || buffer==0) return; char*_t = new char[buflen+1]; -- cgit v0.9.0.2