aboutsummaryrefslogtreecommitdiff
path: root/src/sound-menu.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-02-28 21:05:12 -0600
committerTed Gould <ted@gould.cx>2014-02-28 21:05:12 -0600
commit3664e8f90eabc8ca2b1b7752f9faf56a9d6664d6 (patch)
tree06d9ef5c3fdd3008f064a9995bb9fd103fe09565 /src/sound-menu.vala
parent4d6c4f5a4c6bcb16843b936175988261f2699688 (diff)
downloadayatana-indicator-sound-3664e8f90eabc8ca2b1b7752f9faf56a9d6664d6.tar.gz
ayatana-indicator-sound-3664e8f90eabc8ca2b1b7752f9faf56a9d6664d6.tar.bz2
ayatana-indicator-sound-3664e8f90eabc8ca2b1b7752f9faf56a9d6664d6.zip
Restructuring to ensure we're doing what we want on an update
Diffstat (limited to 'src/sound-menu.vala')
-rw-r--r--src/sound-menu.vala9
1 files changed, 4 insertions, 5 deletions
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);