[MessageTray] Clean up source-vs-notification icon handling

A Source needs exactly one summary icon (which in the case of a
trayicon-based source won't even be just an image), but possibly many
notification icons, which may vary for successive notifications
(particularly in the case of NotificationDaemon notifications). So
differentiate these cases in the API.

https://bugzilla.gnome.org/show_bug.cgi?id=627303
This commit is contained in:
Dan Winship
2010-08-05 13:09:27 -04:00
parent 1951812a47
commit 6f57f07214
4 changed files with 89 additions and 64 deletions

View File

@ -475,10 +475,13 @@ Source.prototype = {
this._receivedId = this._channelText.connect('Received', Lang.bind(this, this._messageReceived));
this._channelText.ListPendingMessagesRemote(false, Lang.bind(this, this._gotPendingMessages));
this._setSummaryIcon(this.createNotificationIcon());
},
createIcon: function(size) {
return contactManager.createAvatar(this._conn, this._targetHandle, size);
createNotificationIcon: function() {
return contactManager.createAvatar(this._conn, this._targetHandle,
this.ICON_SIZE);
},
clicked: function() {