[gnome-shell/wip/fmuellner/notification-redux+sass: 78/122] calendar: Don't acknowledge urgent notifications



commit da9bb1ebc15dd37279641928991366c4cc45152b
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 dda9ea7..5a4b240 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]