aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-12-03 11:43:41 -0600
committerTed Gould <ted@gould.cx>2014-12-03 11:43:41 -0600
commit119ae3decb89f0066dd5abf53d0ab1bef49c15c8 (patch)
tree386ab7d35f351be731a96c6ea5e7bbe178a96de4 /src/service.vala
parent31cef82276a7f6b36b9128abc770d1b6b07fffe5 (diff)
downloadayatana-indicator-sound-119ae3decb89f0066dd5abf53d0ab1bef49c15c8.tar.gz
ayatana-indicator-sound-119ae3decb89f0066dd5abf53d0ab1bef49c15c8.tar.bz2
ayatana-indicator-sound-119ae3decb89f0066dd5abf53d0ab1bef49c15c8.zip
Ensuring that if high volume changes we also show a notification (i.e. the headphones were plugged in)
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala10
1 files changed, 6 insertions, 4 deletions
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<string, SoundMenu> (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;
}