[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:11 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=f6e7b04

The following commit has been merged in the master branch:
commit f6e7b04514fa4126c25bcd4fc08ecd05d725135c
Author: Mikhail Ivchenko <ematirov at gmail.com>
Date:   Mon Jan 5 21:49:23 2015 -0800

    Added a button to incoming call notifications to mute the phone ringing.
    
    REVIEW: 121854
---
 plugins/telephony/kdeconnect_telephony.desktop |  2 +-
 plugins/telephony/telephonyplugin.cpp          | 14 +++++++++++++-
 plugins/telephony/telephonyplugin.h            |  1 +
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/plugins/telephony/kdeconnect_telephony.desktop b/plugins/telephony/kdeconnect_telephony.desktop
index 2a72248..d44b595 100644
--- a/plugins/telephony/kdeconnect_telephony.desktop
+++ b/plugins/telephony/kdeconnect_telephony.desktop
@@ -60,4 +60,4 @@ Comment[uk]=Показ сповіщень щодо дзвінків і SMS (ск
 Comment[x-test]=xxShow notifications for calls and SMS (answering coming soon)xx
 
 X-KdeConnect-SupportedPackageType=kdeconnect.telephony
-X-KdeConnect-OutgoingPackageType=
+X-KdeConnect-OutgoingPackageType=kdeconnect.telephony
diff --git a/plugins/telephony/telephonyplugin.cpp b/plugins/telephony/telephonyplugin.cpp
index 4e1c0a1..5e46ba3 100644
--- a/plugins/telephony/telephonyplugin.cpp
+++ b/plugins/telephony/telephonyplugin.cpp
@@ -22,9 +22,9 @@
 
 #include <KLocalizedString>
 #include <KIcon>
-
 #include <core/kdebugnamespace.h>
 
+
 K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< TelephonyPlugin >(); )
 K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_telephony", "kdeconnect-plugins") )
 
@@ -77,6 +77,11 @@ KNotification* TelephonyPlugin::createNotification(const NetworkPackage& np)
     notification->setTitle(title);
     notification->setText(content);
 
+    if (event == "ringing") {
+        notification->setActions( QStringList(i18n("Mute call")) );
+        connect(notification, SIGNAL(action1Activated()), this, SLOT(sendMutePackage()));
+    }
+
     return notification;
 
 }
@@ -99,3 +104,10 @@ bool TelephonyPlugin::receivePackage(const NetworkPackage& np)
     return true;
 
 }
+
+void TelephonyPlugin::sendMutePackage()
+{
+    NetworkPackage package(PACKAGE_TYPE_TELEPHONY);
+    package.set<QString>( "action", "mute" );
+    sendPackage(package);
+}
diff --git a/plugins/telephony/telephonyplugin.h b/plugins/telephony/telephonyplugin.h
index 1b11ad2..047d986 100644
--- a/plugins/telephony/telephonyplugin.h
+++ b/plugins/telephony/telephonyplugin.h
@@ -40,6 +40,7 @@ public:
 public Q_SLOTS:
     virtual bool receivePackage(const NetworkPackage& np);
     virtual void connected() { }
+    void sendMutePackage();
 
 private:
     KNotification* createNotification(const NetworkPackage& np);

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list