[gnome-shell/gnome-3-10] remoteSearch: Let remote search providers not provide an icon
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-10] remoteSearch: Let remote search providers not provide an icon
- Date: Tue, 10 Dec 2013 16:01:17 +0000 (UTC)
commit fa3284232f563473d1b30e5eac8bf9d530f63a81
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Dec 6 12:56:43 2013 +0100
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
js/ui/remoteSearch.js | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js
index f48a37f..c99e812 100644
--- a/js/ui/remoteSearch.js
+++ b/js/ui/remoteSearch.js
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]