diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-01-11 16:44:38 -0600 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-01-11 16:44:38 -0600 |
commit | 412bffad64182bfae1e2408b89f9488f0da38481 (patch) | |
tree | 1617f11e230dcd76678196fd1fde6b95a1742bcd /src/music-player-bridge.vala | |
parent | 13d392dab3f0fcba861bd6607ce17d68990b9228 (diff) | |
parent | 714c7c49776e8a341254a3e4297b465d181206cd (diff) | |
download | ayatana-indicator-sound-412bffad64182bfae1e2408b89f9488f0da38481.tar.gz ayatana-indicator-sound-412bffad64182bfae1e2408b89f9488f0da38481.tar.bz2 ayatana-indicator-sound-412bffad64182bfae1e2408b89f9488f0da38481.zip |
Import upstream version 0.5.5
Diffstat (limited to 'src/music-player-bridge.vala')
-rw-r--r-- | src/music-player-bridge.vala | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala index c7391cf..7587684 100644 --- a/src/music-player-bridge.vala +++ b/src/music-player-bridge.vala @@ -59,8 +59,9 @@ public class MusicPlayerBridge : GLib.Object null, this.fetch_icon_name(desktop), calculate_menu_position(), + null, PlayerController.state.OFFLINE ); - this.registered_clients.set(mpris_key, ctrl); + this.registered_clients.set(mpris_key, ctrl); } } @@ -74,7 +75,9 @@ public class MusicPlayerBridge : GLib.Object } } - public void client_has_become_available ( string desktop, string dbus_name ) + public void client_has_become_available ( string desktop, + string dbus_name, + bool use_playlists ) { if (desktop == null || desktop == ""){ warning("Client %s attempting to register without desktop entry being set on the mpris root", @@ -82,8 +85,9 @@ public class MusicPlayerBridge : GLib.Object return; } if (desktop in this.settings_manager.fetch_blacklist()) { - debug ("Client %s attempting to register but it has been blacklisted", + debug ("Client %s attempting to register but I'm afraid it is blacklisted", desktop); + return; } debug ( "client_has_become_available %s", desktop ); @@ -103,6 +107,7 @@ public class MusicPlayerBridge : GLib.Object dbus_name, this.fetch_icon_name(desktop), this.calculate_menu_position(), + use_playlists, PlayerController.state.READY ); this.registered_clients.set ( mpris_key, ctrl ); debug ( "Have not seen this %s before, new controller created.", desktop ); @@ -110,6 +115,7 @@ public class MusicPlayerBridge : GLib.Object debug ( "application added to the interested list" ); } else{ + this.registered_clients[mpris_key].use_playlists = use_playlists; this.registered_clients[mpris_key].update_state ( PlayerController.state.READY ); this.registered_clients[mpris_key].activate ( dbus_name ); debug("Application has already registered - awaken the hibernation: %s \n", dbus_name ); @@ -118,7 +124,8 @@ public class MusicPlayerBridge : GLib.Object public void client_has_vanished ( string mpris_root_interface ) { - debug("MusicPlayerBridge -> on_server_removed with value %s", mpris_root_interface); + debug("MusicPlayerBridge -> client with dbus interface %s has vanished", + mpris_root_interface ); if (root_menu != null){ debug("attempt to remove %s", mpris_root_interface); var mpris_key = determine_key ( mpris_root_interface ); @@ -128,7 +135,7 @@ public class MusicPlayerBridge : GLib.Object } } } - + public void set_root_menu_item ( Dbusmenu.Menuitem menu ) { this.root_menu = menu; |