summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/applet
Unidiff
Diffstat (limited to 'noncore/net/opietooth/applet') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp8
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp
index 90b0c6d..6351d4e 100644
--- a/noncore/net/opietooth/applet/bluezapplet.cpp
+++ b/noncore/net/opietooth/applet/bluezapplet.cpp
@@ -117,5 +117,5 @@ namespace OpieTooth {
117 } 117 }
118 118
119 int BluezApplet::setBluezStatus(int c) { 119 int BluezApplet::setBluezStatus(int c, bool sync) {
120 120
121 if ( c == 1 ) { 121 if ( c == 1 ) {
@@ -139,6 +139,10 @@ namespace OpieTooth {
139 break; 139 break;
140 } 140 }
141 if (sync) {
142 ::system("/etc/init.d/bluetooth start >/dev/null 2>/dev/null");
143 } else {
141 QCopEnvelope e("QPE/System", "execute(QString)"); 144 QCopEnvelope e("QPE/System", "execute(QString)");
142 e << QString("/etc/init.d/bluetooth start"); 145 e << QString("/etc/init.d/bluetooth start");
146 }
143 } else { 147 } else {
144 ::system("/etc/init.d/bluetooth stop >/dev/null 2>/dev/null"); 148 ::system("/etc/init.d/bluetooth stop >/dev/null 2>/dev/null");
@@ -170,5 +174,5 @@ namespace OpieTooth {
170 m_wasOn = checkBluezStatus(); 174 m_wasOn = checkBluezStatus();
171 if (!m_wasOn) { 175 if (!m_wasOn) {
172 setBluezStatus(1); 176 setBluezStatus(1, true);
173 sleep(2); 177 sleep(2);
174 } 178 }
diff --git a/noncore/net/opietooth/applet/bluezapplet.h b/noncore/net/opietooth/applet/bluezapplet.h
index 90bee3b..1937934 100644
--- a/noncore/net/opietooth/applet/bluezapplet.h
+++ b/noncore/net/opietooth/applet/bluezapplet.h
@@ -56,5 +56,5 @@ public slots:
56 void launchManager(); 56 void launchManager();
57 bool checkBluezStatus(); 57 bool checkBluezStatus();
58 int setBluezStatus(int); 58 int setBluezStatus(int, bool sync = false);
59 int checkBluezDiscoveryStatus(); 59 int checkBluezDiscoveryStatus();
60 int setBluezDiscoveryStatus(int); 60 int setBluezDiscoveryStatus(int);