[gnome-music/wip/merge: 310/343] Fix the MediaKeys for keyboard control of music



commit 9f92c58e67d360b74f8519b338aa7aa9eb56b421
Author: Manish Sinha <manishsinha ubuntu com>
Date:   Sun Jul 21 02:09:03 2013 -0700

    Fix the MediaKeys for keyboard control of music

 gnomemusic/window.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 184d80f..dcecc12 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -43,15 +43,16 @@ class Window(Gtk.ApplicationWindow):
         if signal != 'MediaPlayerKeyPressed':
             print('Received an unexpected signal \'%s\' from media player'.format(signal))
             return
-
-        key = parameters.get_child_value(1).get_string()[0]
-        if key == 'Play':
+        type(parameters)
+        type(parameters.get_child_value(1))
+        response = parameters.get_child_value(1).get_string()
+        if 'Play' in response:
             self.player.PlayPause()
-        elif key == 'Stop':
+        elif 'Stop' in response:
             self.player.Stop()
-        elif key == 'Next':
+        elif 'Next' in response:
             self.player.Next()
-        elif key == 'Previous':
+        elif 'Previous' in response:
             self.player.Previous()
 
     def _setup_view(self):


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