diff options
author | Conor Curran <conor.curran@canonical.com> | 2012-05-03 15:05:51 -0700 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2012-05-03 15:05:51 -0700 |
commit | 5f9a9b8b0ba50dcb5f47233df9e7123ed37501ad (patch) | |
tree | 4b45bce45257a4180639cb212127d492cb721a29 | |
parent | 7d4792274560f8cc4738280f2f0fd88387df47cc (diff) | |
download | ayatana-indicator-sound-5f9a9b8b0ba50dcb5f47233df9e7123ed37501ad.tar.gz ayatana-indicator-sound-5f9a9b8b0ba50dcb5f47233df9e7123ed37501ad.tar.bz2 ayatana-indicator-sound-5f9a9b8b0ba50dcb5f47233df9e7123ed37501ad.zip |
be explicit in handling ardour
-rw-r--r-- | src/music-player-bridge.vala | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala index bd69668..5b9afea 100644 --- a/src/music-player-bridge.vala +++ b/src/music-player-bridge.vala @@ -278,14 +278,20 @@ 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[1]; + result = temp[0]; } return result; } |