mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
remoteSearch: Let remote search providers not provide an icon
The documentation indicates that they are optional, so let us make the code behave accordingly. https://bugzilla.gnome.org/show_bug.cgi?id=719965
This commit is contained in:
parent
090af35ea1
commit
c7ff45045c
1 changed files with 7 additions and 3 deletions
|
|
@ -191,7 +191,9 @@ const RemoteSearchProvider = new Lang.Class({
|
|||
},
|
||||
|
||||
createIcon: function(size, meta) {
|
||||
let gicon;
|
||||
let gicon = null;
|
||||
let icon = null;
|
||||
|
||||
if (meta['icon']) {
|
||||
gicon = Gio.icon_deserialize(meta['icon']);
|
||||
} else if (meta['gicon']) {
|
||||
|
|
@ -203,8 +205,10 @@ const RemoteSearchProvider = new Lang.Class({
|
|||
bitsPerSample, width, height, rowStride);
|
||||
}
|
||||
|
||||
return new St.Icon({ gicon: gicon,
|
||||
icon_size: size });
|
||||
if (gicon)
|
||||
icon = new St.Icon({ gicon: gicon,
|
||||
icon_size: size });
|
||||
return icon;
|
||||
},
|
||||
|
||||
filterResults: function(results, maxNumber) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue