[gimp] plug-ins: Check for errors when loading file-png.ui
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: Check for errors when loading file-png.ui
- Date: Sat, 9 Jan 2010 19:02:39 +0000 (UTC)
commit 7c32f5442adf392d1035e28b235608356038591c
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Jan 9 20:02:53 2010 +0100
plug-ins: Check for errors when loading file-png.ui
Check for errors when loading file-png.ui. Still continue execution
though even if an error occurs, because the user can still export.
plug-ins/common/file-png.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
index 2213ef2..b09deb6 100644
--- a/plug-ins/common/file-png.c
+++ b/plug-ins/common/file-png.c
@@ -1794,6 +1794,7 @@ save_dialog (gint32 image_ID,
GtkBuilder *builder;
gchar *ui_file;
GimpParasite *parasite;
+ GError *error = NULL;
/* Dialog init */
dialog = gimp_export_dialog_new (_("PNG"), PLUG_IN_BINARY, SAVE_PROC);
@@ -1809,7 +1810,10 @@ save_dialog (gint32 image_ID,
ui_file = g_build_filename (gimp_data_directory (),
"ui/file-png.ui",
NULL);
- gtk_builder_add_from_file (builder, ui_file, NULL /*error*/);
+ if (! gtk_builder_add_from_file (builder, ui_file, &error))
+ g_printerr ("Failed loading '%s': %s",
+ ui_file,
+ error ? error->message : "???");
g_free (ui_file);
/* Table */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]