diff options
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/service.vala b/src/service.vala index ad9698e..269ddd7 100644 --- a/src/service.vala +++ b/src/service.vala @@ -216,9 +216,13 @@ public class IndicatorSound.Service { action.activate.connect ( () => { player.launch (); }); this.actions.insert (action); - var play_action = new SimpleAction.stateful ("play." + player.id, null, player.is_playing); + var play_action = new SimpleAction.stateful ("play." + player.id, null, player.state); play_action.activate.connect ( () => player.play_pause () ); this.actions.insert (play_action); + player.notify.connect ( (object, pspec) => { + if (pspec.name == "state") + play_action.set_state (player.state); + }); var next_action = new SimpleAction ("next." + player.id, null); next_action.activate.connect ( () => player.next () ); |