diff options
Diffstat (limited to 'daemon/manager.cpp')
| -rw-r--r-- | daemon/manager.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/daemon/manager.cpp b/daemon/manager.cpp index 691d7a5..cfa955b 100644 --- a/daemon/manager.cpp +++ b/daemon/manager.cpp @@ -47,6 +47,21 @@ void Manager::onPebbleChanged() } } +void Manager::onConnectedChanged() +{ + QString message = QString("%1 %2") + .arg(watch->name().isEmpty() ? "Pebble" : watch->name()) + .arg(watch->isConnected() ? "connected" : "disconnected"); + qDebug() << message; + + if (notification.isPublished()) notification.remove(); + + notification.setBody(message); + if (!notification.publish()) { + qDebug() << "Failed publishing notification"; + } +} + void Manager::onActiveVoiceCallChanged() { qDebug() << "Manager::onActiveVoiceCallChanged()"; |
