messageTray: Primarily use a GIcon to drive the source's icon

This is a bit of a cleanup since we ported notification icons/secondary
icons to be in the same situation.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
This commit is contained in:
Jasper St. Pierre
2012-09-15 03:10:15 -03:00
parent 928ea3bb01
commit f5974f6793
3 changed files with 15 additions and 21 deletions

View File

@ -1122,10 +1122,14 @@ const Source = new Lang.Class({
// Provides a sane default implementation, override if you need
// something more fancy.
createIcon: function(size) {
return new St.Icon({ icon_name: this.iconName,
return new St.Icon({ gicon: this.getIcon(),
icon_size: size });
},
getIcon: function() {
return new Gio.ThemedIcon({ name: this.iconName });
},
_ensureMainIcon: function() {
if (this._mainIcon)
return;