-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 39a9c6e..a380ac7 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -125,66 +125,68 @@ namespace OpieTooth { //menu->insertItem( tr("More..."), 7 ) QPoint p = mapToGlobal( QPoint(1, -menu->sizeHint().height()-1) ); ret = menu->exec(p, 0); // qDebug("ret was %d\n", ret); switch(ret) { case 0: setBluezStatus(0); timerEvent(NULL); break; case 1: setBluezStatus(1); timerEvent(NULL); break; case 2: // start bluetoothmanager launchManager(); timerEvent(NULL); break; case 3: setBluezDiscoveryStatus(0); timerEvent(NULL); break; case 4: setBluezDiscoveryStatus(1); timerEvent(NULL); break; //case 7: // With table of currently-detected devices. } + delete menu; } + /** * Launches the bluetooth manager */ void BluezApplet::launchManager() { QCopEnvelope e("QPE/System", "execute(QString)"); e << QString("bluetooth-manager"); } /** * Refresh timer * @param the timer event */ void BluezApplet::timerEvent( QTimerEvent * ) { int oldactive = bluezactive; int olddiscovery = bluezDiscoveryActive; bluezactive = checkBluezStatus(); bluezDiscoveryActive = checkBluezDiscoveryStatus(); if ((bluezactive != oldactive) || (bluezDiscoveryActive != olddiscovery)) { paintEvent(NULL); } } /** * Implementation of the paint event * @param the QPaintEvent */ void BluezApplet::paintEvent( QPaintEvent* ) { QPainter p(this); qDebug("paint bluetooth pixmap"); |