[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [amarok] /: Fix MPRIS2 DesktopEntry value
From:       Matěj_Laitl <matej () laitl ! cz>
Date:       2016-08-20 11:12:20
Message-ID: E1bb4CK-0008D6-AD () code ! kde ! org
[Download RAW message or body]

Git commit 9449ec56d1fd77a0bfa1f7134a2bf4f91ffd14d3 by Mat=C4=9Bj Laitl, on=
 behalf of Antonio Rojas.
Committed on 20/08/2016 at 11:10.
Pushed by laitl into branch 'master'.

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.h=
tml#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

M  +2    -0    ChangeLog
M  +1    -5    src/dbus/mpris2/MediaPlayer2.cpp

http://commits.kde.org/amarok/9449ec56d1fd77a0bfa1f7134a2bf4f91ffd14d3

diff --git a/ChangeLog b/ChangeLog
index 7197bf4..f427e97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@ VERSION 2.9.0
    * Fix background color of the lyrics applet, thanks to Stefano Pettini.=
 (BR 314854)
    * Fix Organize tracks / Guess tags presets not persisted properly;
      thanks to Stefano Pettini. (BR 226144)
+   * Fix MPRIS2 DesktopEntry name, makes media controls in Plasma 5.7 task=
bar work
+     again; thanks to Antonio Rojas, Rex Dieter. (BR 365275)
 =

 =

 VERSION 2.8.90
diff --git a/src/dbus/mpris2/MediaPlayer2.cpp b/src/dbus/mpris2/MediaPlayer=
2.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-deskt=
op-file-id
-    return QLatin1String("kde4-amarok");
+    return QLatin1String("amarok");
 }
 =

 QStringList MediaPlayer2::SupportedUriSchemes() const
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic