Diffstat (limited to 'noncore/net/opietooth/applet/bluezapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 12 |
1 files changed, 8 insertions, 4 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 | |||
@@ -118,3 +118,3 @@ namespace OpieTooth { | |||
118 | 118 | ||
119 | int BluezApplet::setBluezStatus(int c) { | 119 | int BluezApplet::setBluezStatus(int c, bool sync) { |
120 | 120 | ||
@@ -140,4 +140,8 @@ namespace OpieTooth { | |||
140 | } | 140 | } |
141 | QCopEnvelope e("QPE/System", "execute(QString)"); | 141 | if (sync) { |
142 | e << QString("/etc/init.d/bluetooth start"); | 142 | ::system("/etc/init.d/bluetooth start >/dev/null 2>/dev/null"); |
143 | } else { | ||
144 | QCopEnvelope e("QPE/System", "execute(QString)"); | ||
145 | e << QString("/etc/init.d/bluetooth start"); | ||
146 | } | ||
143 | } else { | 147 | } else { |
@@ -171,3 +175,3 @@ namespace OpieTooth { | |||
171 | if (!m_wasOn) { | 175 | if (!m_wasOn) { |
172 | setBluezStatus(1); | 176 | setBluezStatus(1, true); |
173 | sleep(2); | 177 | sleep(2); |