diff options
author | Ted Gould <ted@gould.cx> | 2014-02-28 14:35:28 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-02-28 14:35:28 -0600 |
commit | f06b9ff784c15e9e1c0ad0840299ed70b5616a74 (patch) | |
tree | 318cca66f1e2364634df4428747ce8b1068fedf6 | |
parent | df36f41ca206687a0c49584f70011db7e94075b7 (diff) | |
download | ayatana-indicator-sound-f06b9ff784c15e9e1c0ad0840299ed70b5616a74.tar.gz ayatana-indicator-sound-f06b9ff784c15e9e1c0ad0840299ed70b5616a74.tar.bz2 ayatana-indicator-sound-f06b9ff784c15e9e1c0ad0840299ed70b5616a74.zip |
Use the right function and report error
-rw-r--r-- | src/media-player-user.vala | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/media-player-user.vala b/src/media-player-user.vala index 7e5bc53..c48c39b 100644 --- a/src/media-player-user.vala +++ b/src/media-player-user.vala @@ -233,7 +233,13 @@ public class MediaPlayerUser : MediaPlayer { debug("Play Pause for user: %s", this.username); if (this.greeter != null) { - this.greeter.SoundPlayPause(this.username); + this.greeter.RequestSoundPlayPause.begin(this.username, (obj, res) => { + try { + (obj as GreeterBroadcast).RequestSoundPlayPause.end(res); + } catch (Error e) { + warning("Unable to send play pause: %s", e.message); + } + }); } else { warning("No unity-greeter-session-broadcast to send play-pause"); } @@ -242,7 +248,13 @@ public class MediaPlayerUser : MediaPlayer { debug("Next for user: %s", this.username); if (this.greeter != null) { - this.greeter.SoundNext(this.username); + this.greeter.RequestSoundNext.begin(this.username, (obj, res) => { + try { + (obj as GreeterBroadcast).RequestSoundNext.end(res); + } catch (Error e) { + warning("Unable to send next: %s", e.message); + } + }); } else { warning("No unity-greeter-session-broadcast to send next"); } @@ -251,7 +263,13 @@ public class MediaPlayerUser : MediaPlayer { debug("Previous for user: %s", this.username); if (this.greeter != null) { - this.greeter.SoundPrev(this.username); + this.greeter.RequestSoundPrev.begin(this.username, (obj, res) => { + try { + (obj as GreeterBroadcast).RequestSoundPrev.end(res); + } catch (Error e) { + warning("Unable to send previous: %s", e.message); + } + }); } else { warning("No unity-greeter-session-broadcast to send previous"); } |