From c046c8f4bf047668341745a0d573a2b9ce4f1964 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sun, 2 Mar 2014 20:39:27 -0600 Subject: Use the detail to make this a little cleaner --- src/service.vala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/service.vala') diff --git a/src/service.vala b/src/service.vala index a35d465..075c6df 100644 --- a/src/service.vala +++ b/src/service.vala @@ -373,9 +373,8 @@ public class IndicatorSound.Service: Object { var play_action = new SimpleAction.stateful ("play." + player.id, null, player.state); play_action.activate.connect ( () => player.play_pause () ); this.actions.add_action (play_action); - player.notify.connect ( (object, pspec) => { - if (pspec.name == "state") - play_action.set_state (player.state); + player.notify["state"].connect ( (object, pspec) => { + play_action.set_state (player.state); }); var next_action = new SimpleAction ("next." + player.id, null); -- cgit v1.2.3