[gnome-settings-daemon] media-keys: Add support for more multimedia keys



commit 338a2db55d96304ebeedcb3e6f87b88ffa3b7828
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Nov 6 18:02:35 2010 +0000

    media-keys: Add support for more multimedia keys
    
    Add support for FastForward, Rewind, Repeat and Shuffle
    multimedia keys.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=539915

 plugins/media-keys/acme.h                   |    8 ++++++++
 plugins/media-keys/gsd-media-keys-manager.c |   13 ++++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/plugins/media-keys/acme.h b/plugins/media-keys/acme.h
index 6f9447c..4ba6859 100644
--- a/plugins/media-keys/acme.h
+++ b/plugins/media-keys/acme.h
@@ -45,6 +45,10 @@ enum {
         STOP_KEY,
         PREVIOUS_KEY,
         NEXT_KEY,
+        REWIND_KEY,
+        FORWARD_KEY,
+        REPEAT_KEY,
+        RANDOM_KEY,
         HANDLED_KEYS
 };
 
@@ -73,6 +77,10 @@ static struct {
         { STOP_KEY, "stop", NULL, NULL },
         { PREVIOUS_KEY, "previous", NULL, NULL },
         { NEXT_KEY, "next", NULL, NULL },
+        { REWIND_KEY, "rewind", "XF86AudioRewind", NULL },
+        { FORWARD_KEY, "forward", "XF86AudioForward", NULL },
+        { REPEAT_KEY, "repeat", "XF86AudioRepeat", NULL },
+        { RANDOM_KEY, "random", "XF86AudioRandomPlay", NULL}
 };
 
 #endif /* __ACME_H__ */
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index ec6eba5..dbbc21d 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1016,19 +1016,22 @@ do_action (GsdMediaKeysManager *manager,
                 break;
         case PLAY_KEY:
                 return do_multimedia_player_action (manager, "Play");
-                break;
         case PAUSE_KEY:
                 return do_multimedia_player_action (manager, "Pause");
-                break;
         case STOP_KEY:
                 return do_multimedia_player_action (manager, "Stop");
-                break;
         case PREVIOUS_KEY:
                 return do_multimedia_player_action (manager, "Previous");
-                break;
         case NEXT_KEY:
                 return do_multimedia_player_action (manager, "Next");
-                break;
+        case REWIND_KEY:
+                return do_multimedia_player_action (manager, "Rewind");
+        case FORWARD_KEY:
+                return do_multimedia_player_action (manager, "FastForward");
+        case REPEAT_KEY:
+                return do_multimedia_player_action (manager, "Repeat");
+        case RANDOM_KEY:
+                return do_multimedia_player_action (manager, "Shuffle");
         default:
                 g_assert_not_reached ();
         }



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