mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
libgimp: output a "saving metadata failed" message when relevant.
Similar to the message present in file-jpeg. The latter will anyway disappear when we will have finally ported file-jpeg to newer GimpSaveProcedure API, and it's better to have it outputted here so that it will work for every export formats.
This commit is contained in:
parent
5bbc7899bc
commit
e53ce2fde9
1 changed files with 17 additions and 5 deletions
|
@ -846,6 +846,7 @@ gimp_procedure_config_save_metadata (GimpProcedureConfig *config,
|
||||||
if (config->priv->metadata && ! config->priv->metadata_saved)
|
if (config->priv->metadata && ! config->priv->metadata_saved)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_GET_CLASS (config);
|
GObjectClass *object_class = G_OBJECT_GET_CLASS (config);
|
||||||
|
GError *error = NULL;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (metadata_properties); i++)
|
for (i = 0; i < G_N_ELEMENTS (metadata_properties); i++)
|
||||||
|
@ -869,11 +870,22 @@ gimp_procedure_config_save_metadata (GimpProcedureConfig *config,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_image_metadata_save_finish (exported_image,
|
if (! gimp_image_metadata_save_finish (exported_image,
|
||||||
config->priv->mime_type,
|
config->priv->mime_type,
|
||||||
config->priv->metadata,
|
config->priv->metadata,
|
||||||
config->priv->metadata_flags,
|
config->priv->metadata_flags,
|
||||||
file, NULL);
|
file, &error))
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
/* Even though a failure to write metadata is not enough
|
||||||
|
reason to say we failed to save the image, we should
|
||||||
|
still notify the user about the problem. */
|
||||||
|
g_message ("%s: saving metadata failed: %s",
|
||||||
|
G_STRFUNC, error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
config->priv->metadata_saved = TRUE;
|
config->priv->metadata_saved = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue