[gnome-shell/wip/fmuellner/notification-redux: 71/88] 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/88] messageTray: Emit change notifications for unseenCount
- Date: Sun, 15 Feb 2015 17:36:45 +0000 (UTC)
commit c178dabef4071367b13f0d3813f53856c7ad0047
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 185c334..f63be04 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]