From 540fd6a4a7cc86070c94f41833c4b9b9fa0e9824 Mon Sep 17 00:00:00 2001 From: harlekin Date: Thu, 27 Jun 2002 13:04:38 +0000 Subject: cleanups --- (limited to 'noncore/net/opietooth/applet') diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 8bb7a93..c0ad246 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -56,6 +56,8 @@ namespace OpieTooth { // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); startTimer(5000); btDevice = 0; + bluezactive = false; + bluezDiscoveryActive = false; } @@ -100,7 +102,7 @@ namespace OpieTooth { int ret=0; /* Refresh active state */ - timerEvent(NULL); + timerEvent( 0 ); if (bluezactive) { @@ -128,30 +130,29 @@ namespace OpieTooth { switch(ret) { case 0: setBluezStatus(0); - timerEvent(NULL); + timerEvent( 0 ); break; case 1: setBluezStatus(1); - timerEvent(NULL); + timerEvent( 0 ); break; case 2: // start bluetoothmanager launchManager(); - timerEvent(NULL); + timerEvent( 0 ); break; case 3: setBluezDiscoveryStatus(0); - timerEvent(NULL); + timerEvent( 0 ); break; case 4: setBluezDiscoveryStatus(1); - timerEvent(NULL); + timerEvent(0 ); break; //case 7: // With table of currently-detected devices. } - timerEvent(NULL); delete signal; delete menu; } @@ -177,7 +178,7 @@ namespace OpieTooth { bluezDiscoveryActive = checkBluezDiscoveryStatus(); if ((bluezactive != oldactive) || (bluezDiscoveryActive != olddiscovery)) { - paintEvent(NULL); + update(); } } @@ -189,8 +190,6 @@ namespace OpieTooth { QPainter p(this); qDebug("paint bluetooth pixmap"); - p.eraseRect ( 0, 0, this->width(), this->height() ); - if (bluezactive > 0) { p.drawPixmap( 0, 1, bluezOnPixmap ); } else { diff --git a/noncore/net/opietooth/applet/bluezapplet.h b/noncore/net/opietooth/applet/bluezapplet.h index 6a8a00e..a8d91a5 100644 --- a/noncore/net/opietooth/applet/bluezapplet.h +++ b/noncore/net/opietooth/applet/bluezapplet.h @@ -54,7 +54,6 @@ public slots: int setBluezStatus(int); int checkBluezDiscoveryStatus(); int setBluezDiscoveryStatus(int); - int sockfd; private: Device* btDevice; @@ -62,7 +61,7 @@ public slots: QPixmap bluezOffPixmap; QPixmap bluezDiscoveryOnPixmap; bool bluezactive; - int bluezDiscoveryActive; + bool bluezDiscoveryActive; private slots: -- cgit v0.9.0.2