[gimp] plug-ins: fix error reporting and a compiler warning



commit 9317bb454813aa8cd24dfa8f01d834a3174767cc
Author: Sven Neumann <sven gimp org>
Date:   Tue Jan 12 21:12:40 2010 +0100

    plug-ins: fix error reporting and a compiler warning

 plug-ins/common/file-png.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index b09deb6..47a803e 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -677,7 +677,7 @@ load_image (const gchar  *filename,
     end,                        /* Ending tile row */
     num;                        /* Number of rows to load */
   FILE *fp;                     /* File pointer */
-  volatile gint32 image;        /* Image -- preserved against setjmp() */
+  volatile gint32 image = -1;   /* Image -- preserved against setjmp() */
   gint32 layer;                 /* Layer */
   GimpDrawable *drawable;       /* Drawable for layer */
   GimpPixelRgn pixel_rgn;       /* Pixel region for layer */
@@ -1811,9 +1811,15 @@ save_dialog (gint32    image_ID,
                               "ui/file-png.ui",
                               NULL);
   if (! gtk_builder_add_from_file (builder, ui_file, &error))
-    g_printerr ("Failed loading '%s': %s",
-                ui_file,
-                error ? error->message : "???");
+    {
+      gchar *display_name = g_filename_display_name (ui_file);
+
+      g_printerr (_("Error loading UI file '%s': %s"),
+                  display_name, error ? error->message : "???");
+
+      g_free (display_name);
+    }
+
   g_free (ui_file);
 
   /* Table */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]