diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-06-17 18:01:43 -0400 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-06-17 18:01:43 -0400 |
commit | a44eabf4b4972160ead5285a993650a42af0c1bc (patch) | |
tree | 72bcbc486f2093d5941a769e121291a660a23da8 /src/service.vala | |
parent | a0fae2ec3183d1d9a651b38d0e2980c029cd7d28 (diff) | |
download | ayatana-indicator-sound-a44eabf4b4972160ead5285a993650a42af0c1bc.tar.gz ayatana-indicator-sound-a44eabf4b4972160ead5285a993650a42af0c1bc.tar.bz2 ayatana-indicator-sound-a44eabf4b4972160ead5285a993650a42af0c1bc.zip |
Change playback action state to "string"
To accomodate for a third state "Launching" (in addition to "Playing" and
"Paused").
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 () ); |