[SCM] kdeconnect packaging branch, master, updated. upstream/1.0.1-206-gf661872

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 18:27:01 UTC 2017


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

The following commit has been merged in the master branch:
commit 8f4d39424a95b52cba98fcce2597656e2e32239f
Author: Saikrishna Arcot <saiarcot895 at gmail.com>
Date:   Fri Aug 26 11:10:36 2016 +0200

    MPRIS: Send info about whether certain actions are allowed.
    
    So the remote side can then disable some actions as necessary.
    
    REVIEW: 128271
---
 plugins/mpriscontrol/mpriscontrolplugin.cpp | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/plugins/mpriscontrol/mpriscontrolplugin.cpp b/plugins/mpriscontrol/mpriscontrolplugin.cpp
index 98ad168..ce3ca32 100644
--- a/plugins/mpriscontrol/mpriscontrolplugin.cpp
+++ b/plugins/mpriscontrol/mpriscontrolplugin.cpp
@@ -175,6 +175,26 @@ void MprisControlPlugin::propertiesChanged(const QString& propertyInterface, con
         np.set("isPlaying", playing);
         somethingToSend = true;
     }
+    if (properties.contains("CanPause")) {
+        np.set("canPause", properties["CanPause"].toBool());
+        somethingToSend = true;
+    }
+    if (properties.contains("CanPlay")) {
+        np.set("canPlay", properties["CanPlay"].toBool());
+        somethingToSend = true;
+    }
+    if (properties.contains("CanGoNext")) {
+        np.set("canGoNext", properties["CanGoNext"].toBool());
+        somethingToSend = true;
+    }
+    if (properties.contains("CanGoPrevious")) {
+        np.set("canGoPrevious", properties["CanGoPrevious"].toBool());
+        somethingToSend = true;
+    }
+    if (properties.contains("CanSeek")) {
+        np.set("canSeek", properties["CanSeek"].toBool());
+        somethingToSend = true;
+    }
 
     if (somethingToSend) {
         OrgFreedesktopDBusPropertiesInterface* interface = (OrgFreedesktopDBusPropertiesInterface*)sender();
@@ -264,6 +284,12 @@ bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
         bool playing = (mprisInterface.playbackStatus() == QLatin1String("Playing"));
         answer.set("isPlaying", playing);
 
+        answer.set("canPause", mprisInterface.canPause());
+        answer.set("canPlay", mprisInterface.canPlay());
+        answer.set("canGoNext", mprisInterface.canGoNext());
+        answer.set("canGoPrevious", mprisInterface.canGoPrevious());
+        answer.set("canSeek", mprisInterface.canSeek());
+
         somethingToSend = true;
     }
     if (np.get<bool>("requestVolume")) {

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list