aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-29 11:05:16 -0600
committercharles kerr <charlesk@canonical.com>2015-12-29 11:05:16 -0600
commit9c02dfba50242cd2eaf259c3efebc55290cdedcf (patch)
treea9766c7a04b0ed7b249f0c2d31fff4364d51e472
parent707fd6c5e2d5bdfa6ff1b87f770c1d0b8e8d0894 (diff)
downloadayatana-indicator-sound-9c02dfba50242cd2eaf259c3efebc55290cdedcf.tar.gz
ayatana-indicator-sound-9c02dfba50242cd2eaf259c3efebc55290cdedcf.tar.bz2
ayatana-indicator-sound-9c02dfba50242cd2eaf259c3efebc55290cdedcf.zip
prefer Source.REMOVE instead of false in timeout funcs
-rw-r--r--src/media-player-mpris.vala4
-rw-r--r--src/media-player-user.vala3
-rw-r--r--src/service.vala4
3 files changed, 5 insertions, 6 deletions
diff --git a/src/media-player-mpris.vala b/src/media-player-mpris.vala
index 408cdda..148a30a 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
diff --git a/src/media-player-user.vala b/src/media-player-user.vala
index 11678d5..1be1a18 100644
--- a/src/media-player-user.vala
+++ b/src/media-player-user.vala
@@ -75,8 +75,7 @@ public class MediaPlayerUser : MediaPlayer {
properties_queued.remove_all();
- /* Remove source */
- return false;
+ return Source.REMOVE;
}
/* Turns the DBus names into the object properties */
diff --git a/src/service.vala b/src/service.vala
index 40f49b5..707f78d 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -507,7 +507,7 @@ public class IndicatorSound.Service: Object {
this.mute_blocks_sound = false;
this.sound_was_blocked_timeout_id = 0;
this.update_root_icon ();
- return false;
+ return Source.REMOVE;
});
}
@@ -657,7 +657,7 @@ public class IndicatorSound.Service: Object {
clear_acts_player();
this.player_action_update_id = 0;
- return false;
+ return Source.REMOVE;
}
void eventually_update_player_actions () {