summaryrefslogtreecommitdiff
path: root/noncore/settings
Side-by-side diff
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
@@ -1,29 +1,30 @@
#include "mainwindowimp.h"
#include "addconnectionimp.h"
#include "interfaceinformationimp.h"
#include "interfacesetupimp.h"
#include "interfaces.h"
#include "module.h"
/* 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>
#include <qlistbox.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qheader.h>
#include <qlabel.h>
#include <qtabwidget.h> // in order to disable the profiles tab
#include <qmessagebox.h>
#include <qtextstream.h>
#include <qregexp.h>
@@ -523,53 +524,44 @@ void MainWindowImp::updateInterface(Interface *i)
for( it = libraries.begin(); it != libraries.end(); ++it )
{
if(it.key()->isOwner(i))
i->setModuleOwner(it.key());
}
items.insert(i, item);
interfaceItems.insert(item, i);
}
else
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")
typeName = "lo";
if(i->getInterfaceName().contains("irda"))
typeName = "irda";
if(i->getInterfaceName().contains("wlan"))
typeName = "wlan";
if(i->getInterfaceName().contains("usb"))
typeName = "usb";
if(!i->isAttached())
typeName = "connect_no";
// Actually try to use the Module
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(""));
}
void MainWindowImp::newProfileChanged(const QString& newText)
{
if(newText.length() > 0)
newProfileButton->setEnabled(true);
else
newProfileButton->setEnabled(false);
}
@@ -773,21 +765,21 @@ void MainWindowImp::initHostname()
{
OProcess h;
_procTemp="";
h << "hostname";
connect(&h,SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),this,SLOT(slotHostname(Opie::Core::OProcess*,char*,int)));
h.start(OProcess::Block,OProcess::AllOutput);
odebug << "Got " << _procTemp <<oendl;
m_Nameinput->setText(_procTemp.stripWhiteSpace());
_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];
::memset(_t,0,buflen+1);
::memcpy(_t,buffer,buflen);
_procTemp+=_t;
delete[]_t;
}
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
@@ -20,25 +20,27 @@
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "edit.h"
#include "pppdata.h"
#include "iplined.h"
#include "auth.h"
/* OPIE */
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+
+#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
/* QT */
#include <qlayout.h>
#include <qmessagebox.h>
#include <qwhatsthis.h>
#include <qregexp.h>
#include <qapplication.h>
#include <qbuttongroup.h>
#include <qvgroupbox.h>
#include <qhbox.h>
#include <qdialog.h>
@@ -74,27 +76,29 @@ DialWidget::DialWidget( PPPData *pd, QWidget *parent, bool isnewaccount
QHBoxLayout *lpn = new QHBoxLayout(5);
tl->addLayout(lpn, 1, 1);
numbers = new QListBox(this);
// numbers->setMinimumSize(120, 70);
lpn->addWidget(numbers);
QVBoxLayout *lpn1 = new QVBoxLayout;
lpn->addLayout(lpn1);
add = new QPushButton(tr("&Add..."), this);
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);
lpn1->addWidget(up);
lpn1->addWidget(down);
connect(add, SIGNAL(clicked()),
this, SLOT(addNumber()));
connect(del, SIGNAL(clicked()),
this, SLOT(delNumber()));
connect(up, SIGNAL(clicked()),
this, SLOT(upNumber()));
connect(down, SIGNAL(clicked()),
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
@@ -3,25 +3,25 @@
#include "interfacesetupimp.h"
#include "../interfaces/interface.h"
#include <assert.h>
#include <errno.h>
#include <string.h>
/* OPIE */
#include <opie2/odebug.h>
#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;
/* QT */
#include <qapplication.h>
#include <qfile.h>
#include <qdir.h>
#include <qdialog.h>
#include <qtextstream.h>
#include <qmessagebox.h>
#include <qlineedit.h>
#include <qlabel.h>
@@ -593,25 +593,25 @@ void WLANImp::displayFoundNetwork( const QString& mode, int channel, const QStri
{
odebug << "found network: <" << (const char*) mode << ">, chn " << channel
<< ", ssid '" << (const char*) ssid << "', mac '" << (const char*) mac.toString() << "'" << oendl;
QListViewItemIterator it( netView );
while ( it.current() && it.current()->text( col_ssid ) != ssid ) ++it;
if ( !it.current() ) // ssid didn't show up yet
{
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();
}
}
void WLANImp::selectNetwork( QListViewItem* item )
{
bool ok;
if ( item )
{
specifyAp->setChecked(true);