diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2016-01-05 13:13:23 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2016-01-05 13:13:23 -0600 |
commit | 3c528a11f39af91d2856aeac606fdaf8a6c6b673 (patch) | |
tree | b91e31644dd757bad22f2241532100f9009bad92 /src/service.vala | |
parent | cbca1818ef142938022511abded7e39d671866ac (diff) | |
parent | 0eea8e8a2cee47f72292384ac856d3f68208d680 (diff) | |
download | ayatana-indicator-sound-3c528a11f39af91d2856aeac606fdaf8a6c6b673.tar.gz ayatana-indicator-sound-3c528a11f39af91d2856aeac606fdaf8a6c6b673.tar.bz2 ayatana-indicator-sound-3c528a11f39af91d2856aeac606fdaf8a6c6b673.zip |
adding lp:~xavi-garcia-mena/indicator-sound/re-add-integration-tests
Diffstat (limited to 'src/service.vala')
-rw-r--r-- | src/service.vala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/service.vala b/src/service.vala index 12e2ac2..985d434 100644 --- a/src/service.vala +++ b/src/service.vala @@ -40,7 +40,7 @@ public class IndicatorSound.Service: Object { warn_notification.set_hint ("x-canonical-non-shaped-icon", "true"); warn_notification.set_hint ("x-canonical-snap-decisions", "true"); warn_notification.set_hint ("x-canonical-private-affirmative-tint", "true"); - warn_notification.closed.connect((n) => { n.clear_actions(); }); + warn_notification.closed.connect((n) => { n.clear_actions(); waiting_user_approve_warn=false; }); BusWatcher.watch_namespace (GLib.BusType.SESSION, "org.freedesktop.Notifications", () => { debug("Notifications name appeared"); }, @@ -609,7 +609,10 @@ public class IndicatorSound.Service: Object { var warn = loud && this.notify_server_supports_actions && !this.volume_control.high_volume_approved; - + if (waiting_user_approve_warn && volume_control.below_warning_volume) { + volume_control.set_warning_volume(); + close_notification(warn_notification); + } if (warn) { close_notification(info_notification); if (_pre_warn_volume == null) { |