Special-handle Empathy to have multiple sources and to queue notifications

We are planning to add Empathy-specific features in the message tray, but in the
meantime we handle Empathy notifications received through the notification daemon
so that their behavior is closer to the eventual design, which is how it was before
we started associating applications with a single source and enabled notification
replacement.
This commit is contained in:
Marina Zhurakhinskaya
2010-02-22 17:26:00 -05:00
parent 77ed621c74
commit bb0a977edc
2 changed files with 49 additions and 11 deletions

View File

@ -328,6 +328,7 @@ Source.prototype = {
this.text = null;
if (createIcon)
this.createIcon = createIcon;
this.handleReplacing = true;
},
// This can be overridden by a subclass, or by the createIcon
@ -520,7 +521,7 @@ MessageTray.prototype = {
},
_onNotify: function(source, notification) {
if (this._getNotification(notification.id, source) == null) {
if (!notification.source.handleReplacing || this._getNotification(notification.id, source) == null) {
notification.connect('destroy',
Lang.bind(this, this.removeNotification));
this._notificationQueue.push(notification);