summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/qml/pages/ManagerPage.qml9
-rw-r--r--daemon/manager.cpp5
-rw-r--r--daemon/settings.h3
3 files changed, 17 insertions, 0 deletions
diff --git a/app/qml/pages/ManagerPage.qml b/app/qml/pages/ManagerPage.qml
index ecb7610..303c2fa 100644
--- a/app/qml/pages/ManagerPage.qml
+++ b/app/qml/pages/ManagerPage.qml
@@ -41,6 +41,7 @@ Page {
id: settings
path: "/org/pebbled/settings"
property bool silentWhenConnected: false
+ property bool incomingCallNotification: true
property bool notificationsCommhistoryd: true
property bool notificationsMissedCall: true
property bool notificationsEmails: false
@@ -141,6 +142,14 @@ Page {
anchors.rightMargin: Theme.paddingMedium
}
TextSwitch {
+ text: qsTr("Forward phone calls")
+ checked: settings.incomingCallNotification
+ automaticCheck: false
+ onClicked: {
+ settings.incomingCallNotification = !settings.incomingCallNotification;
+ }
+ }
+ TextSwitch {
text: qsTr("Silent when connected")
checked: settings.silentWhenConnected
automaticCheck: false
diff --git a/daemon/manager.cpp b/daemon/manager.cpp
index bd9fc4a..b47c170 100644
--- a/daemon/manager.cpp
+++ b/daemon/manager.cpp
@@ -120,6 +120,11 @@ void Manager::onActiveVoiceCallChanged()
{
logger()->debug() << "Manager::onActiveVoiceCallChanged()";
+ if (!settings->property("incomingCallNotification").toBool()) {
+ logger()->debug() << "Ignoring ActiveVoiceCallChanged because of setting!";
+ return;
+ }
+
VoiceCallHandler* handler = voice->activeVoiceCall();
if (handler) {
connect(handler, SIGNAL(statusChanged()), SLOT(onActiveVoiceCallStatusChanged()));
diff --git a/daemon/settings.h b/daemon/settings.h
index 1f2e2e5..03423e4 100644
--- a/daemon/settings.h
+++ b/daemon/settings.h
@@ -8,6 +8,7 @@ class Settings : public MDConfGroup
Q_OBJECT
Q_PROPERTY(bool silentWhenConnected MEMBER silentWhenConnected NOTIFY silentWhenConnectedChanged)
+ Q_PROPERTY(bool incomingCallNotification MEMBER incomingCallNotification NOTIFY incomingCallNotificationChanged)
Q_PROPERTY(bool notificationsCommhistoryd MEMBER notificationsCommhistoryd NOTIFY notificationsCommhistorydChanged)
Q_PROPERTY(bool notificationsMissedCall MEMBER notificationsMissedCall NOTIFY notificationsMissedCallChanged)
Q_PROPERTY(bool notificationsEmails MEMBER notificationsEmails NOTIFY notificationsEmailsChanged)
@@ -17,6 +18,7 @@ class Settings : public MDConfGroup
Q_PROPERTY(bool notificationsOther MEMBER notificationsOther NOTIFY notificationsOtherChanged)
Q_PROPERTY(bool notificationsAll MEMBER notificationsAll NOTIFY notificationsAllChanged)
bool silentWhenConnected;
+ bool incomingCallNotification;
bool notificationsCommhistoryd;
bool notificationsMissedCall;
bool notificationsEmails;
@@ -33,6 +35,7 @@ public:
signals:
void silentWhenConnectedChanged(bool);
+ void incomingCallNotificationChanged(bool);
void notificationsCommhistorydChanged(bool);
void notificationsMissedCallChanged(bool);
void notificationsEmailsChanged(bool);