messageTray: Use a GIcon for a notification's icon/secondary icon
Using a GIcon instead of an actor means that we can always create a new icon with the right size from an old icon. https://bugzilla.gnome.org/show_bug.cgi?id=680426
This commit is contained in:
@ -356,12 +356,10 @@ const NotificationDaemon = new Lang.Class({
|
||||
ndata.actions, ndata.hints, ndata.notification];
|
||||
|
||||
let gicon = this._iconForNotificationData(icon, hints);
|
||||
let iconActor = new St.Icon({ gicon: gicon,
|
||||
icon_size: MessageTray.NOTIFICATION_ICON_SIZE });
|
||||
|
||||
if (notification == null) {
|
||||
notification = new MessageTray.Notification(source, summary, body,
|
||||
{ icon: iconActor,
|
||||
{ gicon: gicon,
|
||||
bannerMarkup: true });
|
||||
ndata.notification = notification;
|
||||
notification.connect('destroy', Lang.bind(this,
|
||||
@ -386,7 +384,7 @@ const NotificationDaemon = new Lang.Class({
|
||||
this._emitActionInvoked(ndata.id, actionId);
|
||||
}));
|
||||
} else {
|
||||
notification.update(summary, body, { icon: iconActor,
|
||||
notification.update(summary, body, { gicon: gicon,
|
||||
bannerMarkup: true,
|
||||
clear: true });
|
||||
}
|
||||
|
Reference in New Issue
Block a user