[gnome-shell/wip/fmuellner/notification-redux: 82/88] calendar: Don't acknowledge urgent notifications



commit df7356249324edd77379209846d915b38d4bdcc6
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Feb 14 11:01:51 2015 +0100

    calendar: Don't acknowledge urgent notifications
    
    We still want them to show up as banner after closing the calendar.

 js/ui/calendar.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 6b3ec0b..de490a1 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1301,7 +1301,7 @@ const NotificationSection = new Lang.Class({
         }));
         listEntry.connect('close', function() { notification.destroy(); });
         listEntry.notification = notification;
-        if (this.mapped)
+        if (this.mapped && !notification.urgency != MessageTray.Urgency.CRITICAL)
             notification.acknowledged = true;
 
         let children = this._list.get_children();
@@ -1325,7 +1325,8 @@ const NotificationSection = new Lang.Class({
         if (!this.actor.mapped)
             return;
         this._messages.forEach(function(m) {
-            m.notification.acknowledged = true;
+            if (m.notification.urgency != MessageTray.Urgency.CRITICAL)
+                m.notification.acknowledged = true;
         });
     },
 


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