summaryrefslogtreecommitdiff
authordrw <drw>2005-06-15 19:04:33 (UTC)
committer drw <drw>2005-06-15 19:04:33 (UTC)
commitb86723182311fa621451c2641acf62b3b89dceeb (patch) (side-by-side diff)
treef630932a4174f8c8ec030b19262a02a2adb4e27b
parentc93c8f75bb082c0257ce80f9e8a1eb470bdce397 (diff)
downloadopie-b86723182311fa621451c2641acf62b3b89dceeb.zip
opie-b86723182311fa621451c2641acf62b3b89dceeb.tar.gz
opie-b86723182311fa621451c2641acf62b3b89dceeb.tar.bz2
Resource -> OResource and fix compiler warning
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindow/mainwindowimp.cpp20
-rw-r--r--noncore/settings/networksettings/ppp/edit.cpp10
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp4
3 files changed, 15 insertions, 19 deletions
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 <opie2/odebug.h>
#include <opie2/oprocess.h>
+#include <opie2/oresource.h>
+
#include <qpe/applnk.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/qlibrary.h>
-#include <qpe/resource.h>
/* QT */
#include <qpushbutton.h>
@@ -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];
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp
index 6c9735c..0abf161 100644
--- a/noncore/settings/networksettings/ppp/edit.cpp
+++ b/noncore/settings/networksettings/ppp/edit.cpp
@@ -29,7 +29,9 @@
#include "auth.h"
/* OPIE */
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+
+#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
/* QT */
@@ -83,9 +85,11 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
del = new QPushButton(tr("&Remove"), this);
up = new QPushButton(this);
- up->setPixmap( Resource::loadPixmap("up") );
+ up->setPixmap( Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon) );
+ up->setMinimumHeight( AppLnk::smallIconSize()+4 );
down = new QPushButton(this);
- down->setPixmap( Resource::loadPixmap("down") );
+ down->setPixmap( Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon) );
+ down->setMinimumHeight( AppLnk::smallIconSize()+4 );
lpn1->addWidget(add);
lpn1->addWidget(del);
lpn1->addStretch(1);
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index 2fd97c3..0c18bcc 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -12,7 +12,7 @@
#include <opie2/oprocess.h>
#include <opie2/onetwork.h>
#include <opie2/opcap.h>
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
using namespace Opie::Core;
using namespace Opie::Net;
@@ -602,7 +602,7 @@ void WLANImp::displayFoundNetwork( const QString& mode, int channel, const QStri
QListViewItem* item = new QListViewItem( netView, mode.left( 1 ).upper(), ssid, QString::number( channel ), mac.toString() );
QString name;
name.sprintf( "networksettings/%s", (const char*) mode );
- item->setPixmap( col_mode, Resource::loadPixmap( name ) );
+ item->setPixmap( col_mode, Opie::Core::OResource::loadPixmap( name, Opie::Core::OResource::SmallIcon ) );
qApp->processEvents();
}