diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-10-28 11:43:22 -0700 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-10-28 11:43:22 -0700 |
commit | 05d587408fa3b64ff569329d334c82c46eb64829 (patch) | |
tree | 8e557f47e61e1c9240a9ac4766de7ec6d5bc9c40 /src | |
parent | d1c735417327b2914536eecdce06365076e12fe7 (diff) | |
download | ayatana-indicator-sound-05d587408fa3b64ff569329d334c82c46eb64829.tar.gz ayatana-indicator-sound-05d587408fa3b64ff569329d334c82c46eb64829.tar.bz2 ayatana-indicator-sound-05d587408fa3b64ff569329d334c82c46eb64829.zip |
use 'application-default-icon' as the fallback media player icon
Diffstat (limited to 'src')
-rw-r--r-- | src/sound-menu.vala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala index af808b5..4c62b38 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -141,11 +141,15 @@ class SoundMenu: Object void insert_player_section (MediaPlayer player) { var section = new Menu (); + Icon icon; + + icon = player.icon; + if (icon == null) + icon = new ThemedIcon.with_default_fallbacks ("application-default-icon"); var player_item = new MenuItem (player.name, "indicator." + player.id); player_item.set_attribute ("x-canonical-type", "s", "com.canonical.unity.media-player"); - if (player.icon != null) - player_item.set_attribute_value ("icon", g_icon_serialize (player.icon)); + player_item.set_attribute_value ("icon", g_icon_serialize (player.icon)); section.append_item (player_item); var playback_item = new MenuItem (null, null); |