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/volume-control-pulse.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/volume-control-pulse.vala')
-rw-r--r-- | src/volume-control-pulse.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala index 74ef015..d50056b 100644 --- a/src/volume-control-pulse.vala +++ b/src/volume-control-pulse.vala @@ -335,7 +335,7 @@ public class VolumeControlPulse : VolumeControl /* Listen for role volume changes from pulse itself (external clients) */ try { - var builder = new VariantBuilder (new VariantType ("ao")); + var builder = new VariantBuilder (VariantType.OBJECT_PATH_ARRAY); builder.add ("o", sink_input_objp); yield _pconn.call ("org.PulseAudio.Core1", "/org/pulseaudio/core1", @@ -775,7 +775,7 @@ public class VolumeControlPulse : VolumeControl /* AccountsService operations */ private void accountsservice_props_changed_cb (DBusProxy proxy, Variant changed_properties, string[]? invalidated_properties) { - Variant volume_variant = changed_properties.lookup_value ("Volume", new VariantType ("d")); + Variant volume_variant = changed_properties.lookup_value ("Volume", VariantType.DOUBLE); if (volume_variant != null) { var volume = volume_variant.get_double (); if (volume >= 0) { @@ -785,7 +785,7 @@ public class VolumeControlPulse : VolumeControl } } - Variant mute_variant = changed_properties.lookup_value ("Muted", new VariantType ("b")); + Variant mute_variant = changed_properties.lookup_value ("Muted", VariantType.BOOLEAN); if (mute_variant != null) { var mute = mute_variant.get_boolean (); set_mute_internal (mute); |