summaryrefslogtreecommitdiff
path: root/noncore/settings
authordrw <drw>2005-06-15 19:04:33 (UTC)
committer drw <drw>2005-06-15 19:04:33 (UTC)
commitb86723182311fa621451c2641acf62b3b89dceeb (patch) (unidiff)
treef630932a4174f8c8ec030b19262a02a2adb4e27b /noncore/settings
parentc93c8f75bb082c0257ce80f9e8a1eb470bdce397 (diff)
downloadopie-b86723182311fa621451c2641acf62b3b89dceeb.zip
opie-b86723182311fa621451c2641acf62b3b89dceeb.tar.gz
opie-b86723182311fa621451c2641acf62b3b89dceeb.tar.bz2
Resource -> OResource and fix compiler warning
Diffstat (limited to 'noncore/settings') (more/less context) (ignore 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 @@
9/* OPIE */ 9/* OPIE */
10#include <opie2/odebug.h> 10#include <opie2/odebug.h>
11#include <opie2/oprocess.h> 11#include <opie2/oprocess.h>
12#include <opie2/oresource.h>
13
12#include <qpe/applnk.h> 14#include <qpe/applnk.h>
13#include <qpe/qcopenvelope_qws.h> 15#include <qpe/qcopenvelope_qws.h>
14#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
15#include <qpe/config.h> 17#include <qpe/config.h>
16#include <qpe/qlibrary.h> 18#include <qpe/qlibrary.h>
17#include <qpe/resource.h>
18 19
19/* QT */ 20/* QT */
20#include <qpushbutton.h> 21#include <qpushbutton.h>
@@ -532,13 +533,7 @@ void MainWindowImp::updateInterface(Interface *i)
532 item = items[i]; 533 item = items[i];
533 534
534 // Update the icons and information 535 // Update the icons and information
535#ifdef QWS 536 item->setPixmap( 0, Opie::Core::OResource::loadPixmap( i->getStatus() ? "up" : "down", Opie::Core::OResource::SmallIcon ) );
536 QPixmap pic;
537 pic.convertFromImage( Resource::loadImage( i->getStatus() ? "up": "down" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
538 item->setPixmap(0, ( pic ));
539#else
540 item->setPixmap(0, (SmallIcon(i->getStatus() ? "up": "down")));
541#endif
542 537
543 QString typeName = "lan"; 538 QString typeName = "lan";
544 if(i->getInterfaceName() == "lo") 539 if(i->getInterfaceName() == "lo")
@@ -556,11 +551,8 @@ void MainWindowImp::updateInterface(Interface *i)
556 if(i->getModuleOwner() != NULL) 551 if(i->getModuleOwner() != NULL)
557 typeName = i->getModuleOwner()->getPixmapName(i); 552 typeName = i->getModuleOwner()->getPixmapName(i);
558 553
559#ifdef QWS 554 item->setPixmap( 1, ( Opie::Core::OResource::loadPixmap( "networksettings/" + typeName, Opie::Core::OResource::SmallIcon ) ) );
560 item->setPixmap(1, (Resource::loadPixmap(QString("networksettings/") + typeName))); 555
561#else
562 item->setPixmap(1, (SmallIcon(typeName)));
563#endif
564 item->setText(2, i->getHardwareName()); 556 item->setText(2, i->getHardwareName());
565 item->setText(3, QString("(%1)").arg(i->getInterfaceName())); 557 item->setText(3, QString("(%1)").arg(i->getInterfaceName()));
566 item->setText(4, (i->getStatus()) ? i->getIp() : QString("")); 558 item->setText(4, (i->getStatus()) ? i->getIp() : QString(""));
@@ -782,7 +774,7 @@ void MainWindowImp::initHostname()
782 _procTemp=""; 774 _procTemp="";
783} 775}
784 776
785void MainWindowImp::slotHostname(Opie::Core::OProcess *proc, char *buffer, int buflen) 777void MainWindowImp::slotHostname(Opie::Core::OProcess */*proc*/, char *buffer, int buflen)
786{ 778{
787 if (buflen < 1 || buffer==0) return; 779 if (buflen < 1 || buffer==0) return;
788 char*_t = new char[buflen+1]; 780 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 @@
29#include "auth.h" 29#include "auth.h"
30 30
31/* OPIE */ 31/* OPIE */
32#include <qpe/resource.h> 32#include <opie2/oresource.h>
33
34#include <qpe/applnk.h>
33#include <qpe/qpeapplication.h> 35#include <qpe/qpeapplication.h>
34 36
35/* QT */ 37/* QT */
@@ -83,9 +85,11 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
83 del = new QPushButton(tr("&Remove"), this); 85 del = new QPushButton(tr("&Remove"), this);
84 86
85 up = new QPushButton(this); 87 up = new QPushButton(this);
86 up->setPixmap( Resource::loadPixmap("up") ); 88 up->setPixmap( Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon) );
89 up->setMinimumHeight( AppLnk::smallIconSize()+4 );
87 down = new QPushButton(this); 90 down = new QPushButton(this);
88 down->setPixmap( Resource::loadPixmap("down") ); 91 down->setPixmap( Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon) );
92 down->setMinimumHeight( AppLnk::smallIconSize()+4 );
89 lpn1->addWidget(add); 93 lpn1->addWidget(add);
90 lpn1->addWidget(del); 94 lpn1->addWidget(del);
91 lpn1->addStretch(1); 95 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 @@
12#include <opie2/oprocess.h> 12#include <opie2/oprocess.h>
13#include <opie2/onetwork.h> 13#include <opie2/onetwork.h>
14#include <opie2/opcap.h> 14#include <opie2/opcap.h>
15#include <qpe/resource.h> 15#include <opie2/oresource.h>
16using namespace Opie::Core; 16using namespace Opie::Core;
17using namespace Opie::Net; 17using namespace Opie::Net;
18 18
@@ -602,7 +602,7 @@ void WLANImp::displayFoundNetwork( const QString& mode, int channel, const QStri
602 QListViewItem* item = new QListViewItem( netView, mode.left( 1 ).upper(), ssid, QString::number( channel ), mac.toString() ); 602 QListViewItem* item = new QListViewItem( netView, mode.left( 1 ).upper(), ssid, QString::number( channel ), mac.toString() );
603 QString name; 603 QString name;
604 name.sprintf( "networksettings/%s", (const char*) mode ); 604 name.sprintf( "networksettings/%s", (const char*) mode );
605 item->setPixmap( col_mode, Resource::loadPixmap( name ) ); 605 item->setPixmap( col_mode, Opie::Core::OResource::loadPixmap( name, Opie::Core::OResource::SmallIcon ) );
606 qApp->processEvents(); 606 qApp->processEvents();
607 } 607 }
608 608