From 3664e8f90eabc8ca2b1b7752f9faf56a9d6664d6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Feb 2014 21:05:12 -0600 Subject: Restructuring to ensure we're doing what we want on an update --- src/sound-menu.vala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/sound-menu.vala') diff --git a/src/sound-menu.vala b/src/sound-menu.vala index 62f510d..edb72d1 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -95,12 +95,11 @@ class SoundMenu: Object this.update_playlists (player); var handler_id = player.notify["is-running"].connect ( () => { - if (this.hide_inactive) { - if (player.is_running) + if (player.is_running || !this.hide_inactive) + if (this.find_player_section(player) == -1) this.insert_player_section (player); - else - this.remove_player_section (player); - } + else + this.remove_player_section (player); this.update_playlists (player); }); this.notify_handlers.insert (player, handler_id); -- cgit v1.2.3