aboutsummaryrefslogtreecommitdiff
path: root/src/media-player-list.vala
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-04-03 22:44:54 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-04-03 22:44:54 -0400
commitdeb90ed324d668aa3815baac9e279bedac0b14ef (patch)
treea5c61ffe3a7fb703e9e2f22dbfb5d22429edcfa2 /src/media-player-list.vala
parent83c37bd14bcca1b2774bdb9f73c3742da65a65a3 (diff)
downloadayatana-indicator-sound-deb90ed324d668aa3815baac9e279bedac0b14ef.tar.gz
ayatana-indicator-sound-deb90ed324d668aa3815baac9e279bedac0b14ef.tar.bz2
ayatana-indicator-sound-deb90ed324d668aa3815baac9e279bedac0b14ef.zip
MediaPlayerList: use appname.desktop also for lookups
Diffstat (limited to 'src/media-player-list.vala')
-rw-r--r--src/media-player-list.vala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/media-player-list.vala b/src/media-player-list.vala
index 203c69e..6d37b4d 100644
--- a/src/media-player-list.vala
+++ b/src/media-player-list.vala
@@ -57,12 +57,13 @@ public class MediaPlayerList {
* Adds the player associated with @desktop_id. Does nothing if such a player already exists.
*/
public MediaPlayer? insert (string desktop_id) {
- MediaPlayer? player = this._players.lookup (desktop_id);
+ var id = desktop_id.has_suffix (".desktop") ? desktop_id : desktop_id + ".desktop";
+ MediaPlayer? player = this._players.lookup (id);
if (player == null) {
- var appinfo = new DesktopAppInfo (desktop_id.has_suffix (".desktop") ? desktop_id : desktop_id + ".desktop");
+ var appinfo = new DesktopAppInfo (id);
if (appinfo == null) {
- warning ("unable to find application '%s'", desktop_id);
+ warning ("unable to find application '%s'", id);
return null;
}