Notification: fix regression in notification image handling

We must set the image after calling .update(), because we're passing
clear: true and thus we're removing the image too.
Also, we need to specify an explicit icon size, or St.Icon will use
the default (48px)

https://bugzilla.gnome.org/show_bug.cgi?id=692091
This commit is contained in:
Giovanni Campagna 2013-01-19 18:52:15 +01:00
parent 484ef5f2f6
commit 45fde4888e

View File

@ -395,17 +395,17 @@ const NotificationDaemon = new Lang.Class({
// one of 'image-data' or 'image-path' are specified, we show both an icon and // one of 'image-data' or 'image-path' are specified, we show both an icon and
// a large image. // a large image.
if (gicon && gimage) if (gicon && gimage)
image = new St.Icon({ gicon: gimage }); image = new St.Icon({ gicon: gimage,
icon_size: notification.IMAGE_SIZE });
else if (!gicon && gimage) else if (!gicon && gimage)
gicon = gimage; gicon = gimage;
else if (!gicon) else if (!gicon)
gicon = this._fallbackIconForNotificationData(hints); gicon = this._fallbackIconForNotificationData(hints);
notification.setImage(image);
notification.update(summary, body, { gicon: gicon, notification.update(summary, body, { gicon: gicon,
bannerMarkup: true, bannerMarkup: true,
clear: true }); clear: true });
notification.setImage(image);
if (actions.length) { if (actions.length) {
notification.setUseActionIcons(hints['action-icons'] == true); notification.setUseActionIcons(hints['action-icons'] == true);