[gnome-shell/wip/fmuellner/notification-redux: 71/82] messageTray: Emit change notifications for unseenCount
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux: 71/82] messageTray: Emit change notifications for unseenCount
- Date: Sat, 14 Feb 2015 10:12:20 +0000 (UTC)
commit 9c67698ac4da069d66b2803c90c9e95cc2cedfaa
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Feb 14 02:33:54 2015 +0100
messageTray: Emit change notifications for unseenCount
js/ui/messageTray.js | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index d454607..c16b1ae 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -512,7 +512,7 @@ const Notification = new Lang.Class({
this.forFeedback = false;
this.expanded = false;
this.focused = false;
- this.acknowledged = false;
+ this._acknowledged = false;
this._destroyed = false;
this._customContent = false;
this.bannerBodyText = null;
@@ -797,6 +797,17 @@ const Notification = new Lang.Class({
return this.addButton(button, callback);
},
+ get acknowledged() {
+ return this._acknowledged;
+ },
+
+ set acknowledged(v) {
+ if (this._acknowledged == v)
+ return;
+ this._acknowledged = v;
+ this.emit('acknowledged-changed');
+ },
+
setUrgency: function(urgency) {
this.urgency = urgency;
},
@@ -1137,6 +1148,7 @@ const Source = new Lang.Class({
this.notifications.shift().destroy(NotificationDestroyedReason.EXPIRED);
notification.connect('destroy', Lang.bind(this, this._onNotificationDestroy));
+ notification.connect('acknowledged-changed', Lang.bind(this, this.countUpdated));
this.notifications.push(notification);
this.emit('notification-added', notification);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]