From 2a1c4946b5730a85db62f41533a260db26775b01 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Wed, 2 May 2018 20:51:42 +0300 Subject: [PATCH] Add log message when failing to load an icon --- src/icon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/icon.c b/src/icon.c index c7ecf8d..164a618 100644 --- a/src/icon.c +++ b/src/icon.c @@ -63,8 +63,10 @@ static GdkPixbuf *get_pixbuf_from_file(const char *filename) if (is_readable_file(filename)) { GError *error = NULL; pixbuf = gdk_pixbuf_new_from_file(filename, &error); - if (!pixbuf) + if (!pixbuf) { + LOG_W("%s", error->message); g_error_free(error); + } } return pixbuf; } @@ -116,7 +118,7 @@ GdkPixbuf *get_pixbuf_from_icon(const char *iconname) } while (*(end) != '\0'); } if (!pixbuf) - LOG_W("Could not load icon: '%s'", iconname); + LOG_W("No icon found for: '%s'", iconname); g_free(uri_path); return pixbuf;