Created
April 30, 2013 13:35
-
-
Save shivanipods/5488730 to your computer and use it in GitHub Desktop.
Final patch tweak in the play-pause button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5a928c5316f0dbf4b89787f30896ee3976a8116e Mon Sep 17 00:00:00 2001 | |
From: Shivani Poddar <shivani.poddar92@gmail.com> | |
Date: Tue, 30 Apr 2013 18:59:31 +0530 | |
Subject: [PATCH] Fix play pause button | |
--- | |
src/player.js | 5 +++-- | |
1 file changed, 3 insertions(+), 2 deletions(-) | |
diff --git a/src/player.js b/src/player.js | |
index 9d93f5f..413be71 100644 | |
--- a/src/player.js | |
+++ b/src/player.js | |
@@ -54,11 +54,13 @@ const PlayPauseButton = new Lang.Class({ | |
}, | |
set_playing: function() { | |
+ this.set_active(true); | |
this.set_image(this.pause_image); | |
this.show_all(); | |
}, | |
set_paused: function() { | |
+ this.set_active(false); | |
this.set_image(this.play_image); | |
this.show_all(); | |
}, | |
@@ -174,7 +176,7 @@ const Player = new Lang.Class({ | |
if (this.timeout) { | |
GLib.source_remove(this.timeout); | |
} | |
- this.play_btn.set_active(true); | |
+ this.play_btn.set_playing(); | |
if(this.player.get_state(1)[1] != Gst.State.PAUSED) { | |
this.stop(); | |
} | |
@@ -187,7 +189,6 @@ const Player = new Lang.Class({ | |
pause: function () { | |
this.player.set_state(Gst.State.PAUSED); | |
- this.play_btn.set_active(false); | |
}, | |
stop: function() { | |
-- | |
1.8.1.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment