diff options
author | Richard Hughes <richard@hughsie.com> | 2016-02-17 15:13:34 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-02-17 15:13:34 +0000 |
commit | 3b96e9c8c657f086967c8458c432374ed6ac9e5c (patch) | |
tree | be2ec43a2a5c8a19b65ae500cee1f5a5501faa96 /client | |
parent | a88cd8dd95f79c063494c55a73f42b494b2b1560 (diff) | |
download | appstream-glib-3b96e9c8c657f086967c8458c432374ed6ac9e5c.tar.gz |
trivial: Add some more debugging around the HiDPI icon finding
Diffstat (limited to 'client')
-rw-r--r-- | client/as-compose.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/client/as-compose.c b/client/as-compose.c index f36e6d9..3fbdfdf 100644 --- a/client/as-compose.c +++ b/client/as-compose.c @@ -74,6 +74,7 @@ add_icons (AsApp *app, g_autoptr(AsImage) im = NULL; g_autoptr(GdkPixbuf) pixbuf_hidpi = NULL; g_autoptr(GdkPixbuf) pixbuf = NULL; + g_autoptr(GError) error_local = NULL; /* find 64x64 icon */ fn = as_utils_find_icon_filename_full (prefix, key, @@ -131,20 +132,26 @@ add_icons (AsApp *app, fn_hidpi = as_utils_find_icon_filename_full (prefix, key, AS_UTILS_FIND_ICON_HI_DPI, NULL); - if (fn_hidpi == NULL) + if (fn_hidpi == NULL) { + g_debug ("no HiDPI icon found with key %s in %s", key, prefix); return TRUE; + } /* load the HiDPI icon */ + g_debug ("trying to load %s", fn_hidpi); if (!as_image_load_filename_full (im, fn_hidpi, 128, 128, AS_IMAGE_LOAD_FLAG_SHARPEN, - NULL)) { + &error_local)) { + g_debug ("failed to load HiDPI icon: %s", error_local->message); return TRUE; } pixbuf_hidpi = g_object_ref (as_image_get_pixbuf (im)); if (gdk_pixbuf_get_width (pixbuf_hidpi) <= gdk_pixbuf_get_width (pixbuf) || - gdk_pixbuf_get_height (pixbuf_hidpi) <= gdk_pixbuf_get_height (pixbuf)) + gdk_pixbuf_get_height (pixbuf_hidpi) <= gdk_pixbuf_get_height (pixbuf)) { + g_debug ("HiDPI icon no larger than normal icon"); return TRUE; + } as_app_add_kudo_kind (AS_APP (app), AS_KUDO_KIND_HI_DPI_ICON); /* save icon */ |