aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/media-player-list-greeter.vala14
-rw-r--r--src/media-player-user.vala4
2 files changed, 14 insertions, 4 deletions
diff --git a/src/media-player-list-greeter.vala b/src/media-player-list-greeter.vala
index 2f1962e..101211d 100644
--- a/src/media-player-list-greeter.vala
+++ b/src/media-player-list-greeter.vala
@@ -73,7 +73,15 @@ public class MediaPlayerListGreeter : MediaPlayerList {
}
if (selected_user != null && !players.contains(selected_user)) {
- players.insert(selected_user, new MediaPlayerUser(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);
}
if (old_user != null) {
@@ -83,7 +91,9 @@ public class MediaPlayerListGreeter : MediaPlayerList {
if (selected_user != null) {
var new_player = players.lookup(selected_user);
- player_added(new_player);
+
+ if (new_player.is_running)
+ player_added(new_player);
}
}
diff --git a/src/media-player-user.vala b/src/media-player-user.vala
index 28ec5ae..a4b75c3 100644
--- a/src/media-player-user.vala
+++ b/src/media-player-user.vala
@@ -120,8 +120,8 @@ public class MediaPlayerUser : MediaPlayer {
}
});
- /* Update all of them -- we've got a proxy! */
- queue_property_notification("Timestamp");
+ debug("Notifying player is ready for user: %s", this.username);
+ this.notify_property("is-running");
} catch (Error e) {
this.proxy = null;
warning("Unable to get proxy to user '%s' sound settings: %s", username, e.message);