diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2012-05-03 09:07:19 -0700 |
---|---|---|
committer | Package Import Robot <package-import@ubuntu.com> | 2012-05-03 09:07:19 -0700 |
commit | 8c3919c60a789f650a35a72a0891daa340f9e809 (patch) | |
tree | 1d7bbe5414203e473a5e78ae4b4e2176280dbe04 /src/music-player-bridge.vala | |
parent | 3b1ebd8c79d394fa65b53ee23255617440e2fec4 (diff) | |
parent | b68112634c6721221dc7b82e04f798378e26bb9e (diff) | |
download | ayatana-indicator-sound-8c3919c60a789f650a35a72a0891daa340f9e809.tar.gz ayatana-indicator-sound-8c3919c60a789f650a35a72a0891daa340f9e809.tar.bz2 ayatana-indicator-sound-8c3919c60a789f650a35a72a0891daa340f9e809.zip |
* debian/patches/lp_992262.patch
- fix sound indicator not working after amarok close (LP: #992262)
* debian/patches/lp_902715.patch
- Partial fix which sets the accessibility property on the volume
slider menu item. Previously this was achieved by sending a signal
on the indicator object but now it seems the way to update orca is
to set/update the appropriate property on the menuitem. Orca doesn't
broadcast volume updates on slider movement but at least it updates
when the user moves to the item on the menu, previously it was entirely
silent. (LP: #902715)
Diffstat (limited to 'src/music-player-bridge.vala')
-rw-r--r-- | src/music-player-bridge.vala | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala index 18f1c40..5b9afea 100644 --- a/src/music-player-bridge.vala +++ b/src/music-player-bridge.vala @@ -163,7 +163,6 @@ public class MusicPlayerBridge : GLib.Object } var mpris_key = determine_key ( desktop ); - // Are we sure clients will appear like this with the new registration method in place. if ( this.registered_clients.has_key (mpris_key) == false ){ debug("New client has registered that we have not seen before: %s", dbus_name ); PlayerController ctrl = new PlayerController ( this.root_menu, @@ -189,14 +188,14 @@ public class MusicPlayerBridge : GLib.Object public void client_has_vanished ( string mpris_root_interface ) { - debug("MusicPlayerBridge -> client with dbus interface %s has vanished", + debug("\n MusicPlayerBridge -> client with dbus interface %s has vanished", mpris_root_interface ); if (root_menu != null){ - debug("attempt to remove %s", mpris_root_interface); + debug("\n attempt to remove %s", mpris_root_interface); var mpris_key = determine_key ( mpris_root_interface ); if ( mpris_key != null && this.registered_clients.has_key(mpris_key)){ registered_clients[mpris_key].hibernate(); - debug("Successively offlined client %s", mpris_key); + debug("\n Successively offlined client %s", mpris_key); } } } @@ -279,15 +278,21 @@ public class MusicPlayerBridge : GLib.Object */ private static string? determine_key(owned string desktop_or_interface) { + // handle the special case of amarok, (kde4-amarok desktop file name) + if (desktop_or_interface.contains("amarok")){ + return "amarok"; + } + var result = desktop_or_interface; + var tokens = desktop_or_interface.split( "." ); if (tokens != null && tokens.length > 1){ result = tokens[tokens.length - 1]; - } + } var temp = result.split("-"); if (temp != null && temp.length > 1){ result = temp[0]; - } + } return result; } |