[gnome-music] Use MPRIS method for multimedia keys



commit c89066f7a5ec97f60635ac37d35cb3f73e2a71a7
Author: Fabiano FidĂȘncio <fabiano fidencio org>
Date:   Wed Jun 26 11:29:32 2013 +0200

    Use MPRIS method for multimedia keys
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702950

 src/window.js |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/window.js b/src/window.js
index 20b70ed..6e4ee65 100644
--- a/src/window.js
+++ b/src/window.js
@@ -22,7 +22,6 @@ const Lang = imports.lang;
 const Gtk = imports.gi.Gtk;
 const Gd = imports.gi.Gd;
 const Gio = imports.gi.Gio;
-const Gst = imports.gi.Gst;
 const GLib = imports.gi.GLib;
 const Tracker = imports.gi.Tracker;
 
@@ -84,14 +83,11 @@ const MainWindow = new Lang.Class({
 
         let key = parameters.get_child_value(1).get_string()[0];
         if (key == 'Play')
-            if (this.player.player.get_state(1)[1] != Gst.State.PLAYING)
-                this.player.play();
-            else
-                this.player.pause();
+            this.player.PlayPause();
         else if (key == 'Next')
-            this.player.playNext();
+            this.player.Next();
         else if (key == 'Previous')
-            this.player.playPrevious();
+            this.player.Previous();
     },
 
     _setupView: function () {


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