Blob Blame History Raw
From 9449ec56d1fd77a0bfa1f7134a2bf4f91ffd14d3 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Sat, 20 Aug 2016 13:09:02 +0200
Subject: [PATCH 29/47] Fix MPRIS2 DesktopEntry value

According to the MPRIS2 spec, the DesktopEntry value should be
"the basename of the .desktop file" [1], not the desktop-file-id. So
for amarok it should be "amarok" and not "kde4-amarok", regardless of
where the desktop file is installed. This fixes displaying MPRIS
controls in the Amarok taskbar tooltip in Plasma 5.7

[1] https://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html#Property:DesktopEntry

Testing done by Antonio:

Player controls are displayed again in the Amarok taskbar tooltip in Plasma 5.7.

REVIEW: 128418
BUG: 365275
FIXED-IN: 2.9
---
 ChangeLog                        | 2 ++
 src/dbus/mpris2/MediaPlayer2.cpp | 6 +-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/dbus/mpris2/MediaPlayer2.cpp b/src/dbus/mpris2/MediaPlayer2.cpp
index cbe1a2a..a1d1bda 100644
--- a/src/dbus/mpris2/MediaPlayer2.cpp
+++ b/src/dbus/mpris2/MediaPlayer2.cpp
@@ -94,11 +94,7 @@ QString MediaPlayer2::Identity() const
 
 QString MediaPlayer2::DesktopEntry() const
 {
-    // Amarok desktop file is installed in $prefix/share/applications/kde4/
-    // rather than in $prefix/share/applications. The standard way to
-    // represent this dir is with a "kde4-" prefix. See:
-    // http://standards.freedesktop.org/menu-spec/1.0/go01.html#term-desktop-file-id
-    return QLatin1String("kde4-amarok");
+    return QLatin1String("amarok");
 }
 
 QStringList MediaPlayer2::SupportedUriSchemes() const
-- 
2.9.3