[gnome-software/gnome-3-20] trivial: Support getting the pixbuf for LOCAL icons in the plugin loader
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-20] trivial: Support getting the pixbuf for LOCAL icons in the plugin loader
- Date: Thu, 21 Apr 2016 07:49:54 +0000 (UTC)
commit 12977eae53caf2f8ce052eeeeb664d3320642eaf
Author: Richard Hughes <richard hughsie com>
Date: Wed Apr 20 21:44:23 2016 +0100
trivial: Support getting the pixbuf for LOCAL icons in the plugin loader
src/plugins/gs-plugin-icons.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-plugin-icons.c b/src/plugins/gs-plugin-icons.c
index e16b0c5..d952974 100644
--- a/src/plugins/gs-plugin-icons.c
+++ b/src/plugins/gs-plugin-icons.c
@@ -128,17 +128,23 @@ gs_plugin_refine_app (GsPlugin *plugin,
/* invalid */
if (gs_app_get_pixbuf (app) != NULL)
return TRUE;
- if (gs_app_get_icon (app) == NULL)
+ ic = gs_app_get_icon (app);
+ if (ic == NULL)
return TRUE;
+ /* handle LOCAL and STOCK */
+ if (as_icon_get_kind (ic) == AS_ICON_KIND_LOCAL ||
+ as_icon_get_kind (ic) == AS_ICON_KIND_STOCK) {
+ return gs_app_load_icon (app, plugin->scale, error);
+ }
+
/* not applicable */
- ic = gs_app_get_icon (app);
if (as_icon_get_url (ic) == NULL)
return TRUE;
if (as_icon_get_filename (ic) == NULL)
return TRUE;
- /* local */
+ /* a REMOTE that's really LOCAL */
if (g_str_has_prefix (as_icon_get_url (ic), "file://")) {
as_icon_set_filename (ic, as_icon_get_url (ic) + 7);
as_icon_set_kind (ic, AS_ICON_KIND_LOCAL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]