messageTray: Hook SourceActor up to source icon changes automatically
Instead of manually tracking source icon changes, or requiring a manual call to _setSummaryIcon, add a way to emit a signal when we're guaranteed the icon has been changed, and then the source actor will automatically update the icon. _setSummaryIcon is still available for sources such as the notification daemon, that require special treatment for the summary icon (to be used with tray icons) https://bugzilla.gnome.org/show_bug.cgi?id=680426
This commit is contained in:

committed by
Giovanni Campagna

parent
b9226fbcbd
commit
5991c8dca3
@ -557,7 +557,8 @@ const Source = new Lang.Class({
|
||||
processNotification: function(notification, gicon) {
|
||||
if (gicon)
|
||||
this._gicon = gicon;
|
||||
this._setSummaryIcon(this.createIcon(this.ICON_SIZE));
|
||||
if (!this.trayIcon)
|
||||
this.iconUpdated();
|
||||
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
if (notification.resident && this.app && tracker.focus_app == this.app)
|
||||
@ -625,7 +626,7 @@ const Source = new Lang.Class({
|
||||
// notification-based icons (ie, not a trayicon) or if it was unset before
|
||||
if (!this.trayIcon) {
|
||||
this.useNotificationIcon = false;
|
||||
this._setSummaryIcon(this.createIcon(this.ICON_SIZE));
|
||||
this.iconUpdated();
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user