diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-01-31 13:14:47 -0600 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-01-31 13:14:47 -0600 |
commit | cf9b03167ed12086acbd74b97404b082f8e018a8 (patch) | |
tree | 1f8bf0544e98f7ac91352f41e2305d908bdf1e68 /src/music-player-bridge.vala | |
parent | 19938ac8e993a14d8320b75091aaa56894e8175a (diff) | |
download | ayatana-indicator-sound-cf9b03167ed12086acbd74b97404b082f8e018a8.tar.gz ayatana-indicator-sound-cf9b03167ed12086acbd74b97404b082f8e018a8.tar.bz2 ayatana-indicator-sound-cf9b03167ed12086acbd74b97404b082f8e018a8.zip |
players in menu now dynamically controllable from new dbus api
Diffstat (limited to 'src/music-player-bridge.vala')
-rw-r--r-- | src/music-player-bridge.vala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala index c167e08..c6c9913 100644 --- a/src/music-player-bridge.vala +++ b/src/music-player-bridge.vala @@ -41,6 +41,17 @@ public class MusicPlayerBridge : GLib.Object private void on_blacklist_update ( string[] blacklist ) { debug("some blacklist update"); + + foreach(var s in blacklist){ + string key = this.determine_key (s); + if (this.registered_clients.has_key (key)){ + debug ("Apparently %s is now blacklisted - remove thy self", key); + this.registered_clients[key].remove_from_menu(); + this.registered_clients.unset (key); + } + } + // double check present players to ensure dynamic removal/addition + this.watcher.check_for_active_clients.begin(); } private void try_to_add_inactive_familiar_clients() |