From 20696b105754f35485080cb1472f0c384aef4d61 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 18 Sep 2013 17:07:18 +0200 Subject: [PATCH] cssimage: Report filename of file failing to load --- gtk/gtkcssimageurl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkcssimageurl.c b/gtk/gtkcssimageurl.c index 663b6dc04c..efb025db5b 100644 --- a/gtk/gtkcssimageurl.c +++ b/gtk/gtkcssimageurl.c @@ -65,11 +65,14 @@ gtk_css_image_url_load_image (GtkCssImageUrl *url) if (pixbuf == NULL) { cairo_surface_t *empty = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0); + char *uri; /* XXX: Can we get the error somehow sent to the CssProvider? * I don't like just dumping it to stderr or losing it completely. */ - g_warning ("Error loading image: %s", error->message); + uri = g_file_get_uri (url->file); + g_warning ("Error loading image '%s': %s", uri, error->message); g_error_free (error); + g_free (uri); url->loaded_image = _gtk_css_image_surface_new (empty); cairo_surface_destroy (empty); return url->loaded_image;