Index: ChangeLog
===================================================================
--- ChangeLog	(revision 5775)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2008-06-24  Bastien Nocera  <hadess@hadess.net>
+
+	* plugins/mmkeys/rb-mmkeys-plugin.c (media_player_key_pressed):
+	Add support for Repeat, Shuffle, FastForward, and Rewind media
+	keys via gnome-settings-daemon. See bug #539915.
+
 2008-06-24  Christophe Fergeau  <teuf@gnome.org>
 
 	* plugins/ipod/rb-ipod-source.c: (create_ipod_song_from_entry):
Index: plugins/mmkeys/rb-mmkeys-plugin.c
===================================================================
--- plugins/mmkeys/rb-mmkeys-plugin.c	(revision 5775)
+++ plugins/mmkeys/rb-mmkeys-plugin.c	(working copy)
@@ -93,6 +93,10 @@
 	rb_debug ("RBMMKeysPlugin initialising");
 }
 
+/* Offsets for seeking forward, and rewinding in seconds */
+#define FFWD_OFFSET 20
+#define RWD_OFFSET 10
+
 static void
 media_player_key_pressed (DBusGProxy *proxy,
 			  const gchar *application,
@@ -115,6 +119,22 @@
 		rb_shell_player_do_previous (plugin->shell_player, NULL);
 	} else if (strcmp (key, "Next") == 0) {
 		rb_shell_player_do_next (plugin->shell_player, NULL);
+	} else if (strcmp (key, "Repeat") == 0) {
+		gboolean shuffle, repeat;
+
+		if (rb_shell_player_get_playback_state (plugin->shell_player, &shuffle, &repeat)) {
+			rb_shell_player_set_playback_state (plugin->shell_player, shuffle, !repeat);
+		}
+	} else if (strcmp (key, "Shuffle") == 0) {
+		gboolean shuffle, repeat;
+
+		if (rb_shell_player_get_playback_state (plugin->shell_player, &shuffle, &repeat)) {
+			rb_shell_player_set_playback_state (plugin->shell_player, !shuffle, repeat);
+		}
+	} else if (strcmp (key, "FastForward") == 0) {
+		rb_shell_player_seek (plugin->shell_player, FFWD_OFFSET);
+	} else if (strcmp (key, "Rewind") == 0) {
+		rb_shell_player_seek (plugin->shell_player, -RWD_OFFSET);
 	}
 }
 
