[gimp] Bug 772025 - Incomplete toolrc file causes GIMP to hang
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 772025 - Incomplete toolrc file causes GIMP to hang
- Date: Wed, 28 Sep 2016 12:54:12 +0000 (UTC)
commit 062df6bd09717290961c27a614c906138470b815
Author: Michael Natterer <mitch gimp org>
Date: Wed Sep 28 14:50:00 2016 +0200
Bug 772025 - Incomplete toolrc file causes GIMP to hang
gimp_tools_restore(): print the error message when parsing toolrc fails.
app/tools/gimp-tools.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index 8649c75..74e1abe 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -274,7 +274,7 @@ gimp_tools_restore (Gimp *gimp)
g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
if (gimp_config_deserialize_gfile (GIMP_CONFIG (gimp_list), file,
- NULL, NULL))
+ NULL, &error))
{
gint n = gimp_container_get_n_children (gimp->tool_info_list);
gint i;
@@ -299,6 +299,13 @@ gimp_tools_restore (Gimp *gimp)
}
}
}
+ else
+ {
+ if (error->code != G_IO_ERROR_NOT_FOUND)
+ gimp_message_literal (gimp, NULL, GIMP_MESSAGE_WARNING, error->message);
+
+ g_clear_error (&error);
+ }
g_object_unref (file);
g_object_unref (gimp_list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]