diff options
author | Ted Gould <ted@gould.cx> | 2014-02-28 21:47:44 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-02-28 21:47:44 -0600 |
commit | 8b43adebc047ac432f38296eec2e9b2dd7a5f051 (patch) | |
tree | 3da499dbdf241f7a1803f0fca18a94c7bdab835d | |
parent | 37b28dc5427415f3fc69b1c6a2229301314e59ed (diff) | |
download | ayatana-indicator-sound-8b43adebc047ac432f38296eec2e9b2dd7a5f051.tar.gz ayatana-indicator-sound-8b43adebc047ac432f38296eec2e9b2dd7a5f051.tar.bz2 ayatana-indicator-sound-8b43adebc047ac432f38296eec2e9b2dd7a5f051.zip |
When removing disconnect as well
-rw-r--r-- | src/sound-menu.vala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala index 6d36731..701930e 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -111,7 +111,12 @@ class SoundMenu: Object public void remove_player (MediaPlayer player) { this.remove_player_section (player); - this.notify_handlers.remove (player); + + var id = this.notify_handlers.lookup(player); + if (id != 0) { + player.disconnect(id); + this.notify_handlers.remove (player); + } } Menu root; |