aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-11-19 15:14:47 +0100
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2015-11-19 15:14:47 +0100
commitf06c2ddee06bce9ed8320d78a65fd6206db3e6f1 (patch)
tree6c99d5b91281ce49757b0ac1f263a7309bd125bf /src/service.vala
parent73af3f742f2085a1a21616edc92347b105f48e92 (diff)
downloadayatana-indicator-sound-f06c2ddee06bce9ed8320d78a65fd6206db3e6f1.tar.gz
ayatana-indicator-sound-f06c2ddee06bce9ed8320d78a65fd6206db3e6f1.tar.bz2
ayatana-indicator-sound-f06c2ddee06bce9ed8320d78a65fd6206db3e6f1.zip
Fix issues with warning dialog
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/service.vala b/src/service.vala
index 12e2ac2..2b2d667 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,9 @@ 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) {
+ close_notification(warn_notification);
+ }
if (warn) {
close_notification(info_notification);
if (_pre_warn_volume == null) {