From 119ae3decb89f0066dd5abf53d0ab1bef49c15c8 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 3 Dec 2014 11:43:41 -0600 Subject: Ensuring that if high volume changes we also show a notification (i.e. the headphones were plugged in) --- src/service.vala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/service.vala b/src/service.vala index dbf7d35..1f9b880 100644 --- a/src/service.vala +++ b/src/service.vala @@ -51,7 +51,7 @@ public class IndicatorSound.Service: Object { this.actions.add_action (this.create_mute_action ()); this.actions.add_action (this.create_volume_action ()); this.actions.add_action (this.create_mic_volume_action ()); - this.actions.add_action (this.create_high_volume_actions ()); + this.actions.add_action (this.create_high_volume_action ()); this.menus = new HashTable (str_hash, str_equal); this.menus.insert ("desktop_greeter", new SoundMenu (null, SoundMenu.DisplayFlags.SHOW_MUTE | SoundMenu.DisplayFlags.HIDE_PLAYERS | SoundMenu.DisplayFlags.GREETER_PLAYERS)); @@ -440,11 +440,13 @@ public class IndicatorSound.Service: Object { return volume_action; } - Action create_high_volume_actions () { + Action create_high_volume_action () { var high_volume_action = new SimpleAction.stateful("high-volume", null, new Variant.boolean (this.volume_control.high_volume)); - this.volume_control.notify["high-volume"].connect( () => - high_volume_action.set_state(new Variant.boolean (this.volume_control.high_volume))); + this.volume_control.notify["high-volume"].connect( () => { + high_volume_action.set_state(new Variant.boolean (this.volume_control.high_volume)); + update_sync_notification(); + }); return high_volume_action; } -- cgit v1.2.3