diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-31 14:49:42 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-31 14:49:42 -0600 |
commit | b474814000dae6fcb23ac28dd9ed813b5e6d19b1 (patch) | |
tree | 12538a4e1b3c0baa4f40e365e4e91051664dc513 /src/service.vala | |
parent | cbdeea528675b55b634aa9b15f94e64d36c99924 (diff) | |
download | ayatana-indicator-sound-b474814000dae6fcb23ac28dd9ed813b5e6d19b1.tar.gz ayatana-indicator-sound-b474814000dae6fcb23ac28dd9ed813b5e6d19b1.tar.bz2 ayatana-indicator-sound-b474814000dae6fcb23ac28dd9ed813b5e6d19b1.zip |
use predefined VariantTypes instead of reinventing the wheel
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/service.vala b/src/service.vala index cd016c1..8615386 100644 --- a/src/service.vala +++ b/src/service.vala @@ -266,7 +266,7 @@ public class IndicatorSound.Service: Object { } var root_action = actions.lookup_action ("root") as SimpleAction; - var builder = new VariantBuilder (new VariantType ("a{sv}")); + var builder = new VariantBuilder (VariantType.VARDICT); builder.add ("{sv}", "title", new Variant.string (_("Sound"))); builder.add ("{sv}", "accessible-desc", new Variant.string (accessible_name)); builder.add ("{sv}", "icon", serialize_themed_icon (icon)); @@ -619,7 +619,7 @@ public class IndicatorSound.Service: Object { uint export_actions = 0; Variant action_state_for_player (MediaPlayer player, bool show_track = true) { - var builder = new VariantBuilder (new VariantType ("a{sv}")); + var builder = new VariantBuilder (VariantType.VARDICT); builder.add ("{sv}", "running", new Variant ("b", player.is_running)); builder.add ("{sv}", "state", new Variant ("s", player.state)); if (player.current_track != null && show_track) { |