summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp34
1 files changed, 14 insertions, 20 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp
index 6e5ee82..94e29c7 100644
--- a/noncore/net/opietooth/applet/bluezapplet.cpp
+++ b/noncore/net/opietooth/applet/bluezapplet.cpp
@@ -57,3 +57,4 @@ namespace OpieTooth {
startTimer(5000);
- timerEvent(NULL);
+ btDevice = 0;
+
}
@@ -64,5 +65,8 @@ namespace OpieTooth {
int BluezApplet::checkBluezStatus() {
- if (btDevice) {
- if (btDevice->isLoaded() ) {
- return 1;
+ if (btDevice) {
+ if (btDevice->isLoaded() ) {
+ return 1;
+ } else {
+ return 0;
+ }
} else {
@@ -70,5 +74,2 @@ namespace OpieTooth {
}
- } else {
- return 0;
- }
}
@@ -79,4 +80,2 @@ namespace OpieTooth {
btDevice = new Device("/dev/ttySB0", "csr" );
- // system("hciattach /dev/ttySB0 csr");
- //system("hcid");
} else {
@@ -84,6 +83,5 @@ namespace OpieTooth {
delete btDevice;
+ btDevice = 0;
}
- //system("killall hciattach");
- //system("killall hcid");
- }
+ }
return 0;
@@ -124,3 +122,3 @@ namespace OpieTooth {
}
- //menu->insertItem( tr("More..."), 7 )
+
@@ -129,4 +127,2 @@ namespace OpieTooth {
- // qDebug("ret was %d\n", ret);
-
switch(ret) {
@@ -134,3 +130,2 @@ namespace OpieTooth {
setBluezStatus(0);
- timerEvent(NULL);
break;
@@ -138,3 +133,2 @@ namespace OpieTooth {
setBluezStatus(1);
- timerEvent(NULL);
break;
@@ -143,3 +137,2 @@ namespace OpieTooth {
launchManager();
- timerEvent(NULL);
break;
@@ -147,3 +140,2 @@ namespace OpieTooth {
setBluezDiscoveryStatus(0);
- timerEvent(NULL);
break;
@@ -151,3 +143,2 @@ namespace OpieTooth {
setBluezDiscoveryStatus(1);
- timerEvent(NULL);
break;
@@ -156,2 +147,5 @@ namespace OpieTooth {
}
+
+ timerEvent(NULL);
+ delete signal;
delete menu;