diff options
author | charles kerr <charlesk@canonical.com> | 2016-01-13 20:37:55 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2016-01-13 20:37:55 +0000 |
commit | e43001712810b56a1579545ecafd9f9826e7a438 (patch) | |
tree | 068221198bc1ca78180ac7106d2303cbc4e3079e /src/media-player-mpris.vala | |
parent | 9a861c0911ce8345f48909993249c8a74d8bfb2c (diff) | |
parent | 9b72c7f662440844bf59521e124f59bcbddec4a5 (diff) | |
download | ayatana-indicator-sound-e43001712810b56a1579545ecafd9f9826e7a438.tar.gz ayatana-indicator-sound-e43001712810b56a1579545ecafd9f9826e7a438.tar.bz2 ayatana-indicator-sound-e43001712810b56a1579545ecafd9f9826e7a438.zip |
Be more selective about when to show and dismiss the High Volume Warning Dialog. Fixes: #1504065
Approved by: PS Jenkins bot, Xavi Garcia
Diffstat (limited to 'src/media-player-mpris.vala')
-rw-r--r-- | src/media-player-mpris.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/media-player-mpris.vala b/src/media-player-mpris.vala index 408cdda..93ce34e 100644 --- a/src/media-player-mpris.vala +++ b/src/media-player-mpris.vala @@ -226,7 +226,7 @@ public class MediaPlayerMpris: MediaPlayer { if (this.play_when_attached) { /* wait a little before calling PlayPause, some players need some time to set themselves up */ - Timeout.add (1000, () => { proxy.PlayPause.begin (); return false; } ); + Timeout.add (1000, () => { proxy.PlayPause.begin (); return Source.REMOVE; } ); this.play_when_attached = false; } } @@ -269,7 +269,7 @@ public class MediaPlayerMpris: MediaPlayer { return; } - Timeout.add (500, () => { this.fetch_playlists (); return false; } ); + Timeout.add (500, () => { this.fetch_playlists (); return Source.REMOVE; } ); } /* some players (e.g. Spotify) don't follow the spec closely and pass single strings in metadata fields @@ -295,7 +295,7 @@ public class MediaPlayerMpris: MediaPlayer { this.playbackstatus_changed (); } - var metadata = changed_properties.lookup_value ("Metadata", new VariantType ("a{sv}")); + var metadata = changed_properties.lookup_value ("Metadata", VariantType.VARDICT); if (metadata != null) this.update_current_track (metadata); } |