diff options
| -rw-r--r-- | app/qml/pages/AboutPage.qml | 4 | ||||
| -rw-r--r-- | app/qml/pages/ManagerPage.qml | 18 | ||||
| -rw-r--r-- | app/qml/pages/WatchPage.qml | 34 | ||||
| -rw-r--r-- | daemon/manager.cpp | 3 | ||||
| -rw-r--r-- | daemon/notificationmanager.cpp | 23 |
5 files changed, 52 insertions, 30 deletions
diff --git a/app/qml/pages/AboutPage.qml b/app/qml/pages/AboutPage.qml index 200abdf..bec1031 100644 --- a/app/qml/pages/AboutPage.qml +++ b/app/qml/pages/AboutPage.qml @@ -6,10 +6,12 @@ Page { id: page SilicaFlickable { + id: flickable anchors.fill: parent - contentHeight: column.height + VerticalScrollDecorator { flickable: flickable } + Column { id: column width: page.width diff --git a/app/qml/pages/ManagerPage.qml b/app/qml/pages/ManagerPage.qml index 00a4b72..036897e 100644 --- a/app/qml/pages/ManagerPage.qml +++ b/app/qml/pages/ManagerPage.qml @@ -54,9 +54,12 @@ Page { } SilicaFlickable { + id: flickable anchors.fill: parent contentHeight: column.height + VerticalScrollDecorator { flickable: flickable } + PullDownMenu { MenuItem { text: qsTr("About") @@ -86,16 +89,13 @@ Page { } } - ListItem { + Button { visible: pebbled.connected - Label { - text: pebbled.name - truncationMode: TruncationMode.Fade - anchors { - left: parent.left - right: parent.right - margins: Theme.paddingLarge - } + text: pebbled.name + anchors { + left: parent.left + right: parent.right + margins: Theme.paddingLarge } onClicked: pageStack.push(Qt.resolvedUrl("WatchPage.qml")) } diff --git a/app/qml/pages/WatchPage.qml b/app/qml/pages/WatchPage.qml index 68502bd..90e5ec9 100644 --- a/app/qml/pages/WatchPage.qml +++ b/app/qml/pages/WatchPage.qml @@ -37,10 +37,12 @@ Page { id: page SilicaFlickable { + id: flickable anchors.fill: parent - contentHeight: column.height + VerticalScrollDecorator { flickable: flickable } + Column { id: column @@ -50,19 +52,31 @@ Page { title: pebbled.name } - Button { - text: "Ping" - onClicked: { - pebbled.ping(66) + Row { + anchors { + left: parent.left + right: parent.right + margins: Theme.paddingLarge } - } - Button { - text: "Sync Time" - onClicked: { - pebbled.time() + + Button { + text: "Ping" + width: parent.width / 2 + onClicked: { + pebbled.ping(66) + } + } + + Button { + text: "Sync Time" + width: parent.width / 2 + onClicked: { + pebbled.time() + } } } + } } } diff --git a/daemon/manager.cpp b/daemon/manager.cpp index f964f1a..fd31e3d 100644 --- a/daemon/manager.cpp +++ b/daemon/manager.cpp @@ -120,7 +120,8 @@ void Manager::onActiveVoiceCallChanged() { logger()->debug() << "Manager::onActiveVoiceCallChanged()"; - if (!settings->property("incomingCallNotification").toBool()) { + QVariant incomingCallNotification = settings->property("incomingCallNotification"); + if (incomingCallNotification.isValid() && !incomingCallNotification.toBool()) { logger()->debug() << "Ignoring ActiveVoiceCallChanged because of setting!"; return; } diff --git a/daemon/notificationmanager.cpp b/daemon/notificationmanager.cpp index 104c614..1b888d5 100644 --- a/daemon/notificationmanager.cpp +++ b/daemon/notificationmanager.cpp @@ -122,7 +122,8 @@ void NotificationManager::Notify(const QString &app_name, uint replaces_id, cons if (app_name == "messageserver5") { - if (!settings->property("notificationsEmails").toBool()) { + QVariant notificationsEmails = settings->property("notificationsEmails"); + if (!notificationsEmails.isValid() || !notificationsEmails.toBool()) { logger()->debug() << "Ignoring email notification because of setting!"; return; } @@ -137,12 +138,14 @@ void NotificationManager::Notify(const QString &app_name, uint replaces_id, cons QString category = hints.value("category", "").toString(); if (category == "x-nemo.call.missed") { - if (!settings->property("notificationsMissedCall").toBool()) { + QVariant notificationsMissedCall = settings->property("notificationsMissedCall"); + if (notificationsMissedCall.isValid() && !notificationsMissedCall.toBool()) { logger()->debug() << "Ignoring MissedCall notification because of setting!"; return; } } else { - if (!settings->property("notificationsCommhistoryd").toBool()) { + QVariant notificationsCommhistoryd = settings->property("notificationsCommhistoryd"); + if (notificationsCommhistoryd.isValid() && !notificationsCommhistoryd.toBool()) { logger()->debug() << "Ignoring commhistoryd notification because of setting!"; return; } @@ -152,8 +155,8 @@ void NotificationManager::Notify(const QString &app_name, uint replaces_id, cons ); } } else if (app_name == "harbour-mitakuuluu2-server") { - - if (!settings->property("notificationsMitakuuluu").toBool()) { + QVariant notificationsMitakuuluu = settings->property("notificationsMitakuuluu"); + if (notificationsMitakuuluu.isValid() && !notificationsMitakuuluu.toBool()) { logger()->debug() << "Ignoring mitakuuluu notification because of setting!"; return; } @@ -163,8 +166,8 @@ void NotificationManager::Notify(const QString &app_name, uint replaces_id, cons ); } else if (app_name == "twitter-notifications-client") { - - if (!settings->property("notificationsTwitter").toBool()) { + QVariant notificationsTwitter = settings->property("notificationsTwitter"); + if (notificationsTwitter.isValid() && !notificationsTwitter.toBool()) { logger()->debug() << "Ignoring twitter notification because of setting!"; return; } @@ -183,12 +186,14 @@ void NotificationManager::Notify(const QString &app_name, uint replaces_id, cons logger()->debug() << "MSG Prio:" << prio; - if (!settings->property("notificationsAll").toBool() && prio <= 10) { + QVariant notificationsAll = settings->property("notificationsAll"); + if ((!notificationsAll.isValid() || !notificationsAll.toBool()) && prio <= 10) { logger()->debug() << "Ignoring notification because of setting! (all)"; return; } - if (!settings->property("notificationsOther").toBool() && prio < 90) { + QVariant notificationsOther = settings->property("notificationsOther"); + if (notificationsOther.isValid() && !notificationsOther.toBool() && prio < 90) { logger()->debug() << "Ignoring notification because of setting! (other)"; return; } |
