[gnome-shell] messageTray: Ignore showBanners policy for critical notifications



commit 60a2794c8b29fde688daad1df085e08821aa6038
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Mar 13 20:32:06 2017 +0100

    messageTray: Ignore showBanners policy for critical notifications
    
    The critical hint is meant to be used for notifications that must not
    be missed - running out of battery being the prime example - so it
    makes sense to ignore the policy in that case and make sure to always
    show them to the user. This is consistent with blocking normal
    notifications while showing a fullscreen window, but letting critical
    ones through.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779974

 js/ui/messageTray.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 0c7a5e4..63e6ca1 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -803,7 +803,7 @@ const Source = new Lang.Class({
         notification.acknowledged = false;
         this.pushNotification(notification);
 
-        if (this.policy.showBanners) {
+        if (this.policy.showBanners || notification.urgency == Urgency.CRITICAL) {
             this.emit('notify', notification);
         } else {
             notification.playSound();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]