diff options
author | Ted Gould <ted@gould.cx> | 2014-02-28 16:42:24 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-02-28 16:42:24 -0600 |
commit | 386d973866817541a904198865d49ec040d4755d (patch) | |
tree | ecba39a9a69166e62eb8da468d886e545c237013 /src/media-player-list-greeter.vala | |
parent | dd42fb51e44d1a1233e6a803a997af7c20b8dc56 (diff) | |
download | ayatana-indicator-sound-386d973866817541a904198865d49ec040d4755d.tar.gz ayatana-indicator-sound-386d973866817541a904198865d49ec040d4755d.tar.bz2 ayatana-indicator-sound-386d973866817541a904198865d49ec040d4755d.zip |
Use the standard code for only showing ready players
Diffstat (limited to 'src/media-player-list-greeter.vala')
-rw-r--r-- | src/media-player-list-greeter.vala | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/media-player-list-greeter.vala b/src/media-player-list-greeter.vala index 101211d..541fe3e 100644 --- a/src/media-player-list-greeter.vala +++ b/src/media-player-list-greeter.vala @@ -73,15 +73,7 @@ public class MediaPlayerListGreeter : MediaPlayerList { } if (selected_user != null && !players.contains(selected_user)) { - var newplayer = new MediaPlayerUser(selected_user); - newplayer.notify["is-running"].connect((obj, prop) => { - MediaPlayerUser? player = obj as MediaPlayerUser; - if (player == null) return; - if (player.is_running && player.id == this.selected_user) - this.player_added(player); - }); - - players.insert(selected_user, newplayer); + players.insert(selected_user, new MediaPlayerUser(selected_user)); } if (old_user != null) { @@ -92,7 +84,7 @@ public class MediaPlayerListGreeter : MediaPlayerList { if (selected_user != null) { var new_player = players.lookup(selected_user); - if (new_player.is_running) + if (new_player != null) player_added(new_player); } } |