diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-04-03 22:16:01 -0400 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-04-03 22:16:01 -0400 |
commit | e341f4f758fc704ecbc26cd30b96782afa5d54e6 (patch) | |
tree | f41f02da4259d525aa07ec783579c772e97c41c6 | |
parent | b5d24eeed9528525861d7a7c185327a5e19c7bb7 (diff) | |
download | ayatana-indicator-sound-e341f4f758fc704ecbc26cd30b96782afa5d54e6.tar.gz ayatana-indicator-sound-e341f4f758fc704ecbc26cd30b96782afa5d54e6.tar.bz2 ayatana-indicator-sound-e341f4f758fc704ecbc26cd30b96782afa5d54e6.zip |
Append ".desktop" to the desktop entries reported from MPRIS
This is the format that GDesktopAppInfo expects. This means that the apps will
be reffered to as app.desktop in gsettings, which is consistent with how others
are doing it (indicator-messages, unity, gnome shell).
Backwards compatibility with old settings keys is maintained.
-rw-r--r-- | src/media-player-list.vala | 2 | ||||
-rw-r--r-- | src/mpris2-watcher.vala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/media-player-list.vala b/src/media-player-list.vala index 3fa08f3..73f21ce 100644 --- a/src/media-player-list.vala +++ b/src/media-player-list.vala @@ -46,7 +46,7 @@ public class MediaPlayerList { if (player == null) { message (" Really."); - var appinfo = new DesktopAppInfo (desktop_id + ".desktop"); + var appinfo = new DesktopAppInfo (desktop_id.has_suffix (".desktop") ? desktop_id : desktop_id + ".desktop"); if (appinfo == null) { warning ("unable to find application '%s'", desktop_id); return null; diff --git a/src/mpris2-watcher.vala b/src/mpris2-watcher.vala index 06ccb6e..105c797 100644 --- a/src/mpris2-watcher.vala +++ b/src/mpris2-watcher.vala @@ -66,7 +66,7 @@ public class Mpris2Watcher : GLib.Object MprisRoot? mpris2_root = this.create_mpris_root(address); if (mpris2_root == null) return; bool use_playlists = this.supports_playlists ( address ); - client_appeared (mpris2_root.DesktopEntry, address, use_playlists); + client_appeared (mpris2_root.DesktopEntry + ".desktop", address, use_playlists); } } } @@ -87,7 +87,7 @@ public class Mpris2Watcher : GLib.Object else if (previous_owner == "" && current_owner != "") { debug ("Client '%s' has appeared", name); bool use_playlists = this.supports_playlists ( name ); - client_appeared (mpris2_root.DesktopEntry, name, use_playlists); + client_appeared (mpris2_root.DesktopEntry + ".desktop", name, use_playlists); } } |