[gnome-shell/wip/fmuellner/notification-redux: 55/93] calendar: Add some missing bits
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux: 55/93] calendar: Add some missing bits
- Date: Sun, 15 Feb 2015 19:18:59 +0000 (UTC)
commit 310a3236d206f5773ad70163cd9e6b68356cf275
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Feb 13 10:29:00 2015 +0100
calendar: Add some missing bits
js/ui/calendar.js | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 400439b..e08e4b5 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1184,21 +1184,15 @@ const NotificationSection = new Lang.Class({
_sourceAdded: function(tray, source) {
let obj = {
- sourceTitleChangedId: 0,
- sourceDestroyId: 0,
- sourceNotificationAdded: 0,
+ destroyId: 0,
+ notificationAddedId: 0,
};
-/*
- obj.sourceTitleChangedId = source.connect('title-changed', Lang.bind(this, function(source) {
- this._titleChanged(source, obj);
- }));
- obj.sourceDestroyId = source.connect('destroy', Lang.bind(this, function(source) {
+ obj.destroyId = source.connect('destroy', Lang.bind(this, function(source) {
this._onSourceDestroy(source, obj);
}));
- */
- obj.sourceNotificationAdded = source.connect('notification-added',
- Lang.bind(this, this._onNotificationAdded));
+ obj.notificationAddedId = source.connect('notification-added',
+ Lang.bind(this, this._onNotificationAdded));
this._sources.set(source, obj);
},
@@ -1225,6 +1219,13 @@ const NotificationSection = new Lang.Class({
this._list.insert_child_below(listEntry.actor, null);
},
+ _onSourceDestroy: function(source, obj) {
+ source.disconnect(obj.destroyId);
+ source.disconnect(obj.notificationAddedId);
+
+ this._sources.delete(source);
+ },
+
addNotification: function(notification) {
let listEntry = new NotificationListEntry(notification);
// TODO: Keep URGENT notifications on top
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]