[gdk-pixbuf] init: Improve error message for missing cache file
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] init: Improve error message for missing cache file
- Date: Sat, 3 Nov 2012 17:06:18 +0000 (UTC)
commit 463e97de9a0339a60be8da506ddff156619bd69b
Author: John Spencer <maillist-gtk barfooze de>
Date: Sat Nov 3 17:43:21 2012 +0100
init: Improve error message for missing cache file
People on IRC were rightly pointing out that the fix is easy once you
know it. So why wouldn't gdk-pixbuf print it?
Also reinstate the warning. The pixdata module is always loaded so we
need to expect one existing module.
gdk-pixbuf/gdk-pixbuf-io.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index 411ceb6..59bc1ee 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -512,9 +512,13 @@ gdk_pixbuf_io_init (void)
channel = g_io_channel_new_file (filename, "r", &error);
if (!channel) {
/* Don't bother warning if we have some built-in loaders */
- if (file_formats == NULL)
- g_warning ("Cannot open pixbuf loader module file '%s': %s",
- filename, error->message);
+ if (file_formats == NULL || file_formats->next == NULL)
+ g_warning ("Cannot open pixbuf loader module file '%s': %s\n\n"
+ "This likely means that your installation is broken.\n"
+ "Try running the command\n"
+ " gdk-pixbuf-query-loaders > %s\n"
+ "to make things work again for the time being.",
+ filename, error->message, filename);
g_string_free (tmp_buf, TRUE);
g_free (filename);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]