summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2006-05-13 11:47:05 (UTC)
committer mickeyl <mickeyl>2006-05-13 11:47:05 (UTC)
commit89efebff8f5a00089f02397aa0778dd0dbbacdbb (patch) (unidiff)
tree6562aa181606465f3776e552974961465a0c5943
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 (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
@@ -34,8 +34,9 @@
34#include <opie2/odevice.h> 34#include <opie2/odevice.h>
35#include <opie2/odebug.h> 35#include <opie2/odebug.h>
36#include <opie2/oresource.h> 36#include <opie2/oresource.h>
37#include <opie2/oprocess.h> 37#include <opie2/oprocess.h>
38#include <qpe/version.h>
38#include <qpe/applnk.h> 39#include <qpe/applnk.h>
39#include <qpe/qcopenvelope_qws.h> 40#include <qpe/qcopenvelope_qws.h>
40#include <qpe/config.h> 41#include <qpe/config.h>
41using namespace Opie::Core; 42using namespace Opie::Core;
@@ -54,15 +55,13 @@ using namespace Opie::Core;
54 55
55/* STD */ 56/* STD */
56#include <device.h> 57#include <device.h>
57 58
58#define OPIE120 // undefine it fo the latest OPIE
59
60namespace OpieTooth { 59namespace OpieTooth {
61 BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { 60 BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) {
62 setFixedHeight( AppLnk::smallIconSize() ); 61 setFixedHeight( AppLnk::smallIconSize() );
63 setFixedWidth( AppLnk::smallIconSize() ); 62 setFixedWidth( AppLnk::smallIconSize() );
64#ifdef OPIE120 63#if OPIE_VERSION < 102010
65 bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); 64 bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" );
66 bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); 65 bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" );
67 bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass.png" ); 66 bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass.png" );
68#else 67#else
@@ -319,15 +318,15 @@ namespace OpieTooth {
319 QPainter p(this); 318 QPainter p(this);
320 odebug << "paint bluetooth pixmap" << oendl; 319 odebug << "paint bluetooth pixmap" << oendl;
321 320
322 if (bluezactive) { 321 if (bluezactive) {
323#ifdef OPIE120 322#if OPIE_VERSION < 102010
324 p.drawPixmap( 0, -1, bluezOnPixmap ); 323 p.drawPixmap( 0, -1, bluezOnPixmap );
325#else 324#else
326 p.drawPixmap( 0, 0, bluezOnPixmap ); 325 p.drawPixmap( 0, 0, bluezOnPixmap );
327#endif 326#endif
328 } else { 327 } else {
329#ifdef OPIE120 328#if OPIE_VERSION < 102010
330 p.drawPixmap( 0, -1, bluezOffPixmap ); 329 p.drawPixmap( 0, -1, bluezOffPixmap );
331#else 330#else
332 p.drawPixmap( 0, 0, bluezOffPixmap ); 331 p.drawPixmap( 0, 0, bluezOffPixmap );
333#endif 332#endif