diff options
author | charles kerr <charlesk@canonical.com> | 2015-12-28 17:05:42 -0600 |
---|---|---|
committer | charles kerr <charlesk@canonical.com> | 2015-12-28 17:05:42 -0600 |
commit | 2c13e51f5a639d5804f722216c1e036d469e59a1 (patch) | |
tree | d30fc4dc6c6f653c2d9a46018a3db55a19011b37 /src | |
parent | 8beacfb52ca4d044218da633110d996727781494 (diff) | |
download | ayatana-indicator-sound-2c13e51f5a639d5804f722216c1e036d469e59a1.tar.gz ayatana-indicator-sound-2c13e51f5a639d5804f722216c1e036d469e59a1.tar.bz2 ayatana-indicator-sound-2c13e51f5a639d5804f722216c1e036d469e59a1.zip |
fix regression that broke down-volume-button dismissing warning dialog
Diffstat (limited to 'src')
-rw-r--r-- | src/volume-warning.vala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/volume-warning.vala b/src/volume-warning.vala index c36a3f7..6d8cbd5 100644 --- a/src/volume-warning.vala +++ b/src/volume-warning.vala @@ -42,8 +42,10 @@ public class VolumeWarning : Object } public void user_keypress(Key key) { - if (key == Key.VOLUME_DOWN) + if ((key == Key.VOLUME_DOWN) && active) { + _notification.close(); on_user_response(IndicatorSound.WarnNotification.Response.CANCEL); + } } public VolumeWarning (IndicatorSound.Options options, PulseAudio.GLibMainLoop pgloop) { @@ -393,12 +395,13 @@ public class VolumeWarning : Object private void on_user_response(IndicatorSound.WarnNotification.Response response) { + this.active = false; + if (response == IndicatorSound.WarnNotification.Response.OK) { approve_high_volume(); _set_multimedia_volume(_ok_volume); } _ok_volume = PulseAudio.Volume.INVALID; - this.active = false; } } |