aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-24 19:22:52 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-10-24 19:22:52 -0500
commit6f243f49bb29f00211c892eee5e696d6ef50db2d (patch)
treeef9d6e4f0235a0dbd40a59c1b4dbed7d5597de60
parentc936addd06129c46196d487ad37b149b2fbc3a9d (diff)
downloadayatana-indicator-sound-6f243f49bb29f00211c892eee5e696d6ef50db2d.tar.gz
ayatana-indicator-sound-6f243f49bb29f00211c892eee5e696d6ef50db2d.tar.bz2
ayatana-indicator-sound-6f243f49bb29f00211c892eee5e696d6ef50db2d.zip
fix similar variant leaks
-rw-r--r--src/service.vala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/service.vala b/src/service.vala
index c9c25c6..aa992ff 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -175,10 +175,10 @@ public class IndicatorSound.Service {
}
Action create_mute_action () {
- var mute_action = new SimpleAction.stateful ("mute", null, this.volume_control.mute);
+ var mute_action = new SimpleAction.stateful ("mute", null, new Variant.boolean (this.volume_control.mute));
mute_action.activate.connect ( (action, param) => {
- action.change_state (!action.get_state ().get_boolean ());
+ action.change_state (new Variant.boolean (!action.get_state ().get_boolean ()));
});
mute_action.change_state.connect ( (action, val) => {
@@ -186,7 +186,7 @@ public class IndicatorSound.Service {
});
this.volume_control.notify["mute"].connect ( () => {
- mute_action.set_state (this.volume_control.mute);
+ mute_action.set_state (new Variant.boolean (this.volume_control.mute));
this.update_root_icon ();
});
@@ -201,7 +201,7 @@ public class IndicatorSound.Service {
}
Action create_volume_action () {
- var volume_action = new SimpleAction.stateful ("volume", VariantType.INT32, this.volume_control.get_volume ());
+ var volume_action = new SimpleAction.stateful ("volume", VariantType.INT32, new Variant.double (this.volume_control.get_volume ()));
volume_action.change_state.connect ( (action, val) => {
volume_control.set_volume (val.get_double ());
@@ -221,14 +221,14 @@ public class IndicatorSound.Service {
}
Action create_mic_volume_action () {
- var volume_action = new SimpleAction.stateful ("mic-volume", null, this.volume_control.get_mic_volume ());
+ var volume_action = new SimpleAction.stateful ("mic-volume", null, new Variant.double (this.volume_control.get_mic_volume ()));
volume_action.change_state.connect ( (action, val) => {
volume_control.set_mic_volume (val.get_double ());
});
this.volume_control.mic_volume_changed.connect ( (volume) => {
- volume_action.set_state (volume);
+ volume_action.set_state (new Variant.double (volume));
});
this.volume_control.bind_property ("ready", volume_action, "enabled", BindingFlags.SYNC_CREATE);