diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-10-29 00:57:17 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-10-29 00:57:17 +0000 |
commit | 73a77d4613e036fdb4bfe3c2117c54ca4b7f7234 (patch) | |
tree | 3b038c4ba9a7af866f025c5d92e701de926e74e2 /src | |
parent | a440eb1df8296a6b431613ec03aac94db38292c6 (diff) | |
parent | 287a91fa3002f1571982fcc6a507c2ea4106e053 (diff) | |
download | ayatana-indicator-sound-73a77d4613e036fdb4bfe3c2117c54ca4b7f7234.tar.gz ayatana-indicator-sound-73a77d4613e036fdb4bfe3c2117c54ca4b7f7234.tar.bz2 ayatana-indicator-sound-73a77d4613e036fdb4bfe3c2117c54ca4b7f7234.zip |
Depend on vala 0.20 and use its GIcon.serialize().
Approved by PS Jenkins bot, Charles Kerr.
Diffstat (limited to 'src')
-rw-r--r-- | src/service.vala | 2 | ||||
-rw-r--r-- | src/sound-menu.vala | 9 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/service.vala b/src/service.vala index aa992ff..7dc6824 100644 --- a/src/service.vala +++ b/src/service.vala @@ -140,7 +140,7 @@ public class IndicatorSound.Service { static Variant serialize_themed_icon (string icon_name) { var icon = new ThemedIcon.with_default_fallbacks (icon_name); - return g_icon_serialize (icon); + return icon.serialize (); } void update_root_icon () { diff --git a/src/sound-menu.vala b/src/sound-menu.vala index f3f4fd9..5a10596 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -17,9 +17,6 @@ * Lars Uebernickel <lars.uebernickel@canonical.com> */ -/* Icon.serialize() is not yet in gio-2.0.vapi; remove this when it is */ -extern Variant? g_icon_serialize (Icon icon); - class SoundMenu: Object { public enum DisplayFlags { @@ -150,7 +147,7 @@ class SoundMenu: Object var player_item = new MenuItem (player.name, "indicator." + player.id); player_item.set_attribute ("x-canonical-type", "s", "com.canonical.unity.media-player"); if (icon != null) - player_item.set_attribute_value ("icon", g_icon_serialize (icon)); + player_item.set_attribute_value ("icon", icon.serialize ()); section.append_item (player_item); var playback_item = new MenuItem (null, null); @@ -211,8 +208,8 @@ class SoundMenu: Object var slider = new MenuItem (null, action); slider.set_attribute ("x-canonical-type", "s", "com.canonical.unity.slider"); - slider.set_attribute_value ("min-icon", g_icon_serialize (min_icon)); - slider.set_attribute_value ("max-icon", g_icon_serialize (max_icon)); + slider.set_attribute_value ("min-icon", min_icon.serialize ()); + slider.set_attribute_value ("max-icon", max_icon.serialize ()); slider.set_attribute ("min-value", "d", min); slider.set_attribute ("max-value", "d", max); slider.set_attribute ("step", "d", step); |