summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/applet/bluezapplet.cpp
authorharlekin <harlekin>2002-06-27 13:04:38 (UTC)
committer harlekin <harlekin>2002-06-27 13:04:38 (UTC)
commit540fd6a4a7cc86070c94f41833c4b9b9fa0e9824 (patch) (unidiff)
tree821cc0443c0a24fd19329791121cef625910cb72 /noncore/net/opietooth/applet/bluezapplet.cpp
parent56d22ac17fdc194a20fd0deba673943f85e940ea (diff)
downloadopie-540fd6a4a7cc86070c94f41833c4b9b9fa0e9824.zip
opie-540fd6a4a7cc86070c94f41833c4b9b9fa0e9824.tar.gz
opie-540fd6a4a7cc86070c94f41833c4b9b9fa0e9824.tar.bz2
cleanups
Diffstat (limited to 'noncore/net/opietooth/applet/bluezapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp19
1 files changed, 9 insertions, 10 deletions
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 {
56 // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); 56 // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" );
57 startTimer(5000); 57 startTimer(5000);
58 btDevice = 0; 58 btDevice = 0;
59 bluezactive = false;
60 bluezDiscoveryActive = false;
59 61
60 } 62 }
61 63
@@ -100,7 +102,7 @@ namespace OpieTooth {
100 int ret=0; 102 int ret=0;
101 103
102 /* Refresh active state */ 104 /* Refresh active state */
103 timerEvent(NULL); 105 timerEvent( 0 );
104 106
105 107
106 if (bluezactive) { 108 if (bluezactive) {
@@ -128,30 +130,29 @@ namespace OpieTooth {
128 switch(ret) { 130 switch(ret) {
129 case 0: 131 case 0:
130 setBluezStatus(0); 132 setBluezStatus(0);
131 timerEvent(NULL); 133 timerEvent( 0 );
132 break; 134 break;
133 case 1: 135 case 1:
134 setBluezStatus(1); 136 setBluezStatus(1);
135 timerEvent(NULL); 137 timerEvent( 0 );
136 break; 138 break;
137 case 2: 139 case 2:
138 // start bluetoothmanager 140 // start bluetoothmanager
139 launchManager(); 141 launchManager();
140 timerEvent(NULL); 142 timerEvent( 0 );
141 break; 143 break;
142 case 3: 144 case 3:
143 setBluezDiscoveryStatus(0); 145 setBluezDiscoveryStatus(0);
144 timerEvent(NULL); 146 timerEvent( 0 );
145 break; 147 break;
146 case 4: 148 case 4:
147 setBluezDiscoveryStatus(1); 149 setBluezDiscoveryStatus(1);
148 timerEvent(NULL); 150 timerEvent(0 );
149 break; 151 break;
150 //case 7: 152 //case 7:
151 // With table of currently-detected devices. 153 // With table of currently-detected devices.
152 } 154 }
153 155
154 timerEvent(NULL);
155 delete signal; 156 delete signal;
156 delete menu; 157 delete menu;
157 } 158 }
@@ -177,7 +178,7 @@ namespace OpieTooth {
177 bluezDiscoveryActive = checkBluezDiscoveryStatus(); 178 bluezDiscoveryActive = checkBluezDiscoveryStatus();
178 179
179 if ((bluezactive != oldactive) || (bluezDiscoveryActive != olddiscovery)) { 180 if ((bluezactive != oldactive) || (bluezDiscoveryActive != olddiscovery)) {
180 paintEvent(NULL); 181 update();
181 } 182 }
182 } 183 }
183 184
@@ -189,8 +190,6 @@ namespace OpieTooth {
189 QPainter p(this); 190 QPainter p(this);
190 qDebug("paint bluetooth pixmap"); 191 qDebug("paint bluetooth pixmap");
191 192
192 p.eraseRect ( 0, 0, this->width(), this->height() );
193
194 if (bluezactive > 0) { 193 if (bluezactive > 0) {
195 p.drawPixmap( 0, 1, bluezOnPixmap ); 194 p.drawPixmap( 0, 1, bluezOnPixmap );
196 } else { 195 } else {