Commit 2409b6f2 authored by Michael Natterer's avatar Michael Natterer 😴

libgimp: manage boolean "save-comment" properties automatically

using the GimpProcedureConfig/GimpMetadata mechanism.
parent 1c7028aa
......@@ -231,6 +231,11 @@ gimp_image_metadata_save_prepare (GimpImage *image,
if (! gimp_export_color_profile ())
*suggested_flags &= ~GIMP_METADATA_SAVE_COLOR_PROFILE;
/* Comment */
if (! gimp_export_comment ())
*suggested_flags &= ~GIMP_METADATA_SAVE_COMMENT;
return metadata;
}
......@@ -511,6 +516,11 @@ gimp_image_metadata_save_finish (GimpImage *image,
*/
}
if (flags & GIMP_METADATA_SAVE_COMMENT)
{
/* nothing to do, blah blah */
}
success = gimp_metadata_save_to_file (new_metadata, file, error);
g_object_unref (new_metadata);
......
......@@ -99,7 +99,8 @@ metadata_properties[] =
{ "save-xmp", GIMP_METADATA_SAVE_XMP },
{ "save-iptc", GIMP_METADATA_SAVE_IPTC },
{ "save-thumbnail", GIMP_METADATA_SAVE_THUMBNAIL },
{ "save-color-profile", GIMP_METADATA_SAVE_COLOR_PROFILE }
{ "save-color-profile", GIMP_METADATA_SAVE_COLOR_PROFILE },
{ "save-comment", GIMP_METADATA_SAVE_COMMENT }
};
......
......@@ -61,6 +61,8 @@ typedef enum
* @GIMP_METADATA_SAVE_THUMBNAIL: Save a thumbnail of the image
* @GIMP_METADATA_SAVE_COLOR_PROFILE: Save the image's color profile
* Since: 2.10.10
* @GIMP_METADATA_SAVE_COMMENT: Save the image's comment
* Since: 3.0
* @GIMP_METADATA_SAVE_ALL: Save all of the above
*
* What kinds of metadata to save when exporting images.
......@@ -72,6 +74,7 @@ typedef enum
GIMP_METADATA_SAVE_IPTC = 1 << 2,
GIMP_METADATA_SAVE_THUMBNAIL = 1 << 3,
GIMP_METADATA_SAVE_COLOR_PROFILE = 1 << 4,
GIMP_METADATA_SAVE_COMMENT = 1 << 5,
GIMP_METADATA_SAVE_ALL = 0xffffffff
} GimpMetadataSaveFlags;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment