[gnome-shell/wip/fmuellner/notification-redux+sass: 158/207] calendar: Keep urgent notifications on top of the list
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux+sass: 158/207] calendar: Keep urgent notifications on top of the list
- Date: Tue, 17 Feb 2015 17:07:17 +0000 (UTC)
commit 61413b7fd858d350ca8a6fef8c5f03b18fe2205b
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Feb 14 04:58:05 2015 +0100
calendar: Keep urgent notifications on top of the list
js/ui/calendar.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 5098e7e..92fd623 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1297,9 +1297,14 @@ const NotificationSection = new Lang.Class({
if (this.mapped)
notification.acknowledged = true;
+ let children = this._list.get_children();
+ let index;
+ for (index = 0; index < children.length; index++)
+ if (children[index]._delegate.notification.urgency <= notification.urgency)
+ break;
+
let listChild = this.addMessage(listEntry, this.actor.mapped);
- // TODO: Keep URGENT notifications on top
- this._list.set_child_below_sibling(listChild, null);
+ this._list.set_child_at_index(listChild, index);
},
_onSourceDestroy: function(source, obj) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]