aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/media-player-list-greeter.vala12
-rw-r--r--src/service.vala2
2 files changed, 3 insertions, 11 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);
}
}
diff --git a/src/service.vala b/src/service.vala
index be0164d..f1a002f 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -35,7 +35,7 @@ public class IndicatorSound.Service: Object {
this.actions.add_action (this.create_mic_volume_action ());
this.menus = new HashTable<string, SoundMenu> (str_hash, str_equal);
- this.menus.insert ("desktop_greeter", new SoundMenu (null, SoundMenu.DisplayFlags.SHOW_MUTE));
+ this.menus.insert ("desktop_greeter", new SoundMenu (null, SoundMenu.DisplayFlags.SHOW_MUTE | SoundMenu.DisplayFlags.HIDE_INACTIVE_PLAYERS));
this.menus.insert ("desktop", new SoundMenu ("indicator.desktop-settings", SoundMenu.DisplayFlags.SHOW_MUTE));
this.menus.insert ("phone", new SoundMenu ("indicator.phone-settings", SoundMenu.DisplayFlags.HIDE_INACTIVE_PLAYERS));