summaryrefslogtreecommitdiff
path: root/noncore
authormickeyl <mickeyl>2006-05-13 11:47:05 (UTC)
committer mickeyl <mickeyl>2006-05-13 11:47:05 (UTC)
commit89efebff8f5a00089f02397aa0778dd0dbbacdbb (patch) (side-by-side diff)
tree6562aa181606465f3776e552974961465a0c5943 /noncore
parente847e13515267ae9dc32648c3a427794a9449dfd (diff)
downloadopie-89efebff8f5a00089f02397aa0778dd0dbbacdbb.zip
opie-89efebff8f5a00089f02397aa0778dd0dbbacdbb.tar.gz
opie-89efebff8f5a00089f02397aa0778dd0dbbacdbb.tar.bz2
don't use hand cooked #ifdef versions for conditional compiling, this breaks OE
I added a numerical version code in OPIE_VERSION which you can use. fixed all tests in bluezapplet.cpp
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp
index 6351d4e..f7774f0 100644
--- a/noncore/net/opietooth/applet/bluezapplet.cpp
+++ b/noncore/net/opietooth/applet/bluezapplet.cpp
@@ -32,12 +32,13 @@
/* OPIE */
#include <opie2/otaskbarapplet.h>
#include <opie2/odevice.h>
#include <opie2/odebug.h>
#include <opie2/oresource.h>
#include <opie2/oprocess.h>
+#include <qpe/version.h>
#include <qpe/applnk.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/config.h>
using namespace Opie::Core;
/* QT */
@@ -52,19 +53,17 @@ using namespace Opie::Core;
#include <qpopupmenu.h>
#include <qmessagebox.h>
/* STD */
#include <device.h>
-#define OPIE120 // undefine it fo the latest OPIE
-
namespace OpieTooth {
BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) {
setFixedHeight( AppLnk::smallIconSize() );
setFixedWidth( AppLnk::smallIconSize() );
-#ifdef OPIE120
+#if OPIE_VERSION < 102010
bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" );
bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" );
bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass.png" );
#else
bluezOnPixmap = OResource::loadImage( "bluetoothapplet/bluezon", OResource::SmallIcon );
bluezOffPixmap = OResource::loadImage( "bluetoothapplet/bluezoff", Opie::Core::OResource::SmallIcon );
@@ -317,19 +316,19 @@ namespace OpieTooth {
*/
void BluezApplet::paintEvent( QPaintEvent* ) {
QPainter p(this);
odebug << "paint bluetooth pixmap" << oendl;
if (bluezactive) {
-#ifdef OPIE120
+#if OPIE_VERSION < 102010
p.drawPixmap( 0, -1, bluezOnPixmap );
#else
p.drawPixmap( 0, 0, bluezOnPixmap );
#endif
} else {
-#ifdef OPIE120
+#if OPIE_VERSION < 102010
p.drawPixmap( 0, -1, bluezOffPixmap );
#else
p.drawPixmap( 0, 0, bluezOffPixmap );
#endif
}