[gnome-settings-daemon] media-keys: Make "Pause" work for MPRIS clients



commit 8f71e60bae2b04464721a1f5db98e503e100bf3e
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Nov 7 17:11:24 2013 +0100

    media-keys: Make "Pause" work for MPRIS clients
    
    There's no XF86AudioPlayPause key, just XF86AudioPlay,
    even if the kernel does differentiate them (KEY_PLAYPAUSE vs.
    KEY_PLAY).
    
    We should send "PlayPause" instead of "Play" to the MPRIS client.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705348

 plugins/media-keys/mpris-controller.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/media-keys/mpris-controller.c b/plugins/media-keys/mpris-controller.c
index f525b0b..00cabda 100644
--- a/plugins/media-keys/mpris-controller.c
+++ b/plugins/media-keys/mpris-controller.c
@@ -83,6 +83,9 @@ mpris_controller_key (MprisController *self, const gchar *key)
   if (!priv->mpris_client_proxy)
     return FALSE;
 
+  if (g_strcmp0 (key, "Play") == 0)
+    key = "PlayPause";
+
   g_debug ("calling %s over dbus to mpris client %s",
            key, g_dbus_proxy_get_name (priv->mpris_client_proxy));
   g_dbus_proxy_call (priv->mpris_client_proxy,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]