summaryrefslogtreecommitdiff
path: root/sowatchd
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-11 20:15:36 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-11 20:15:36 +0200
commitac182bd9bf076b4d03d4812e85b989edae32d756 (patch)
tree7d05a80a2e6e44e3fe0dbd3384bf6c18321fa2b8 /sowatchd
parent505f7b1cf62c6934f5246c5e62eccb0a26cb1ce2 (diff)
downloadsowatch-ac182bd9bf076b4d03d4812e85b989edae32d756.tar.gz
sowatch-ac182bd9bf076b4d03d4812e85b989edae32d756.zip
able to navigate watchlets in liveview
Diffstat (limited to 'sowatchd')
-rw-r--r--sowatchd/watchhandler.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/sowatchd/watchhandler.cpp b/sowatchd/watchhandler.cpp
index cdd520d..20d49f9 100644
--- a/sowatchd/watchhandler.cpp
+++ b/sowatchd/watchhandler.cpp
@@ -57,8 +57,6 @@ WatchHandler::WatchHandler(ConfigKey *config, QObject *parent)
_server = new WatchServer(_watch, this);
// Configure the server
- _server->setNextWatchletButton(_config->value("next-watchlet-button").toString());
-
QString idle_watchlet_id = _config->value("idle-watchlet").toString();
if (!idle_watchlet_id.isEmpty()) {
Watchlet *watchlet = createWatchlet(idle_watchlet_id);
@@ -217,8 +215,22 @@ void WatchHandler::handleConfigSubkeyChanged(const QString &subkey)
} else if (subkey == "providers") {
qDebug() << "Providers list changed";
updateProviders();
- } else if (subkey == "next-watchlet-button" && _server) {
- _server->setNextWatchletButton(_config->value("next-watchlet-button").toString());
+ } else if (subkey == "idle-watchlet" && _server) {
+ qDebug() << "Idle watchlet changed";
+ QString id(_config->value("idle-watchlet").toString());
+ if (!id.isEmpty()) {
+ _server->setIdleWatchlet(createWatchlet(id));
+ } else {
+ _server->setIdleWatchlet(0);
+ }
+ } else if (subkey == "notification-watchlet" && _server) {
+ qDebug() << "Notification watchlet changed";
+ QString id(_config->value("notification-watchlet").toString());
+ if (!id.isEmpty()) {
+ _server->setNotificationWatchlet(createWatchlet(id));
+ } else {
+ _server->setNotificationWatchlet(0);
+ }
}
}