messageTray: Add Source.pushNotification method
This allows clients to make minor adjustments to their notification content without triggering a new popup. https://bugzilla.gnome.org/show_bug.cgi?id=642793
This commit is contained in:
parent
29d473f2fa
commit
4029202635
@ -844,12 +844,13 @@ Source.prototype = {
|
||||
return this._iconBin;
|
||||
},
|
||||
|
||||
notify: function(notification) {
|
||||
pushNotification: function(notification) {
|
||||
if (this.notification) {
|
||||
this.notification.disconnect(this._notificationClickedId);
|
||||
this.notification.disconnect(this._notificationDestroyedId);
|
||||
}
|
||||
|
||||
// FIXME: Right now, we don't save multiple notifications.
|
||||
this.notification = notification;
|
||||
|
||||
this._notificationClickedId = notification.connect('clicked', Lang.bind(this, this.open));
|
||||
@ -862,7 +863,10 @@ Source.prototype = {
|
||||
this._notificationRemoved();
|
||||
}
|
||||
}));
|
||||
},
|
||||
|
||||
notify: function(notification) {
|
||||
this.pushNotification(notification);
|
||||
this.emit('notify', notification);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user