libgimp, plug-ins: rename the various "save-*" metadata arguments…

… per discussion with Liam on IRC.

I should have done this sooner, not in a RC, but it's better to do it
now, rather than after 3.0 is released!
This commit is contained in:
Jehan 2025-01-20 16:06:45 +01:00
parent beecc7b723
commit d511efb822
13 changed files with 97 additions and 97 deletions

View file

@ -532,38 +532,38 @@ gimp_export_procedure_add_metadata (GimpExportProcedure *export_procedure)
return;
if (export_procedure->supports_exif)
gimp_procedure_add_boolean_aux_argument (procedure, "save-exif",
gimp_procedure_add_boolean_aux_argument (procedure, "include-exif",
_("Save _Exif"),
_("Save Exif (Exchangeable image file format) metadata"),
gimp_export_exif (),
G_PARAM_READWRITE);
if (export_procedure->supports_iptc)
gimp_procedure_add_boolean_aux_argument (procedure, "save-iptc",
gimp_procedure_add_boolean_aux_argument (procedure, "include-iptc",
_("Save _IPTC"),
_("Save IPTC (International Press Telecommunications Council) metadata"),
gimp_export_iptc (),
G_PARAM_READWRITE);
if (export_procedure->supports_xmp)
gimp_procedure_add_boolean_aux_argument (procedure, "save-xmp",
gimp_procedure_add_boolean_aux_argument (procedure, "include-xmp",
_("Save _XMP"),
_("Save XMP (Extensible Metadata Platform) metadata"),
gimp_export_xmp (),
G_PARAM_READWRITE);
if (export_procedure->supports_profile)
gimp_procedure_add_boolean_aux_argument (procedure, "save-color-profile",
gimp_procedure_add_boolean_aux_argument (procedure, "include-color-profile",
_("Save color _profile"),
_("Save the ICC color profile as metadata"),
gimp_export_color_profile (),
G_PARAM_READWRITE);
if (export_procedure->supports_thumbnail)
gimp_procedure_add_boolean_aux_argument (procedure, "save-thumbnail",
gimp_procedure_add_boolean_aux_argument (procedure, "include-thumbnail",
_("Save _thumbnail"),
_("Save a smaller representation of the image as metadata"),
gimp_export_thumbnail (),
G_PARAM_READWRITE);
if (export_procedure->supports_comment)
{
gimp_procedure_add_boolean_aux_argument (procedure, "save-comment",
gimp_procedure_add_boolean_aux_argument (procedure, "include-comment",
_("Save c_omment"),
_("Save a comment as metadata"),
gimp_export_comment (),
@ -732,7 +732,7 @@ gimp_export_procedure_set_capabilities (GimpExportProcedure *procedure
*
* This will have several consequences:
*
* - Automatically adds a standard auxiliary argument "save-exif" in the
* - Automatically adds a standard auxiliary argument "include-exif" in the
* end of the argument list of @procedure, with relevant blurb and
* description.
* - If used with other gimp_export_procedure_set_support_*() functions,
@ -771,7 +771,7 @@ gimp_export_procedure_set_support_exif (GimpExportProcedure *procedure,
*
* This will have several consequences:
*
* - Automatically adds a standard auxiliary argument "save-iptc" in the
* - Automatically adds a standard auxiliary argument "include-iptc" in the
* end of the argument list of @procedure, with relevant blurb and
* description.
* - If used with other gimp_export_procedure_set_support_*() functions,
@ -810,7 +810,7 @@ gimp_export_procedure_set_support_iptc (GimpExportProcedure *procedure,
*
* This will have several consequences:
*
* - Automatically adds a standard auxiliary argument "save-xmp" in the
* - Automatically adds a standard auxiliary argument "include-xmp" in the
* end of the argument list of @procedure, with relevant blurb and
* description.
* - If used with other gimp_export_procedure_set_support_*() functions,
@ -850,7 +850,7 @@ gimp_export_procedure_set_support_xmp (GimpExportProcedure *procedure,
* This will have several consequences:
*
* - Automatically adds a standard auxiliary argument
* "save-color-profile" in the end of the argument list of @procedure,
* "include-color-profile" in the end of the argument list of @procedure,
* with relevant blurb and description.
* - If used with other gimp_export_procedure_set_support_*() functions,
* they will always be ordered the same (the order of the calls don't
@ -888,7 +888,7 @@ gimp_export_procedure_set_support_profile (GimpExportProcedure *procedure,
*
* This will have several consequences:
*
* - Automatically adds a standard auxiliary argument "save-thumbnail"
* - Automatically adds a standard auxiliary argument "include-thumbnail"
* in the end of the argument list of @procedure, with relevant blurb
* and description.
* - If used with other gimp_export_procedure_set_support_*() functions,
@ -928,7 +928,7 @@ gimp_export_procedure_set_support_thumbnail (GimpExportProcedure *procedure,
*
* This will have several consequences:
*
* - Automatically adds a standard auxiliary argument "save-comment"
* - Automatically adds a standard auxiliary argument "include-comment"
* in the end of the argument list of @procedure, with relevant blurb
* and description.
* - If used with other gimp_export_procedure_set_support_*() functions,

View file

@ -185,7 +185,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog,
if (gimp_export_procedure_get_support_exif (export_procedure))
{
widget = gimp_prop_check_button_new (G_OBJECT (config),
"save-exif", NULL);
"include-exif", NULL);
gtk_grid_attach (GTK_GRID (grid), widget,
left, 0, 6 / n_metadata, 1);
left += 6 / n_metadata;
@ -195,7 +195,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog,
if (gimp_export_procedure_get_support_iptc (export_procedure))
{
widget = gimp_prop_check_button_new (G_OBJECT (config),
"save-iptc", NULL);
"include-iptc", NULL);
gtk_grid_attach (GTK_GRID (grid), widget,
left, 0, 6 / n_metadata, 1);
left += 6 / n_metadata;
@ -205,7 +205,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog,
if (gimp_export_procedure_get_support_xmp (export_procedure))
{
widget = gimp_prop_check_button_new (G_OBJECT (config),
"save-xmp", NULL);
"include-xmp", NULL);
gtk_grid_attach (GTK_GRID (grid), widget,
left, 0, 6 / n_metadata, 1);
left += 6 / n_metadata;
@ -219,7 +219,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog,
if (gimp_export_procedure_get_support_profile (export_procedure))
{
widget = gimp_prop_check_button_new (G_OBJECT (config),
"save-color-profile", NULL);
"include-color-profile", NULL);
gtk_grid_attach (GTK_GRID (grid), widget,
left, top, 6 / n_metadata, 1);
left += 6 / n_metadata;
@ -228,7 +228,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog,
if (gimp_export_procedure_get_support_thumbnail (export_procedure))
{
widget = gimp_prop_check_button_new (G_OBJECT (config),
"save-thumbnail", NULL);
"include-thumbnail", NULL);
gtk_grid_attach (GTK_GRID (grid), widget,
left, top, 6 / n_metadata, 1);
left += 6 / n_metadata;
@ -269,7 +269,7 @@ gimp_export_procedure_dialog_fill_end (GimpProcedureDialog *dialog,
frame2 = gimp_frame_new (NULL);
title = gimp_prop_check_button_new (G_OBJECT (config),
"save-comment", NULL);
"include-comment", NULL);
gtk_frame_set_label_widget (GTK_FRAME (frame2), title);
gtk_widget_show (title);
@ -328,17 +328,17 @@ gimp_export_procedure_dialog_fill_list (GimpProcedureDialog *dialog,
gchar *propname = iter->data;
if ((gimp_export_procedure_get_support_exif (export_procedure) &&
g_strcmp0 (propname, "save-exif") == 0) ||
g_strcmp0 (propname, "include-exif") == 0) ||
(gimp_export_procedure_get_support_iptc (export_procedure) &&
g_strcmp0 (propname, "save-iptc") == 0) ||
g_strcmp0 (propname, "include-iptc") == 0) ||
(gimp_export_procedure_get_support_xmp (export_procedure) &&
g_strcmp0 (propname, "save-xmp") == 0) ||
g_strcmp0 (propname, "include-xmp") == 0) ||
(gimp_export_procedure_get_support_profile (export_procedure) &&
g_strcmp0 (propname, "save-color-profile") == 0) ||
g_strcmp0 (propname, "include-color-profile") == 0) ||
(gimp_export_procedure_get_support_thumbnail (export_procedure) &&
g_strcmp0 (propname, "save-thumbnail") == 0) ||
g_strcmp0 (propname, "include-thumbnail") == 0) ||
(gimp_export_procedure_get_support_comment (export_procedure) &&
(g_strcmp0 (propname, "save-comment") == 0 ||
(g_strcmp0 (propname, "include-comment") == 0 ||
g_strcmp0 (propname, "gimp-comment") == 0)) ||
g_list_find (export_dialog->additional_metadata, propname))
/* Ignoring the standards and custom metadata. */

View file

@ -117,12 +117,12 @@ static const struct
}
metadata_properties[] =
{
{ "save-exif", GIMP_METADATA_SAVE_EXIF },
{ "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-comment", GIMP_METADATA_SAVE_COMMENT }
{ "include-exif", GIMP_METADATA_SAVE_EXIF },
{ "include-xmp", GIMP_METADATA_SAVE_XMP },
{ "include-iptc", GIMP_METADATA_SAVE_IPTC },
{ "include-thumbnail", GIMP_METADATA_SAVE_THUMBNAIL },
{ "include-color-profile", GIMP_METADATA_SAVE_COLOR_PROFILE },
{ "include-comment", GIMP_METADATA_SAVE_COMMENT }
};
@ -1048,12 +1048,12 @@ _gimp_procedure_config_end_run (GimpProcedureConfig *config,
* The following boolean arguments of the used [class@ExportProcedure] are
* synced. The procedure can but must not provide these arguments.
*
* - "save-exif" for %GIMP_METADATA_SAVE_EXIF.
* - "save-xmp" for %GIMP_METADATA_SAVE_XMP.
* - "save-iptc" for %GIMP_METADATA_SAVE_IPTC.
* - "save-thumbnail" for %GIMP_METADATA_SAVE_THUMBNAIL.
* - "save-color-profile" for %GIMP_METADATA_SAVE_COLOR_PROFILE.
* - "save-comment" for %GIMP_METADATA_SAVE_COMMENT.
* - "include-exif" for %GIMP_METADATA_SAVE_EXIF.
* - "include-xmp" for %GIMP_METADATA_SAVE_XMP.
* - "include-iptc" for %GIMP_METADATA_SAVE_IPTC.
* - "include-thumbnail" for %GIMP_METADATA_SAVE_THUMBNAIL.
* - "include-color-profile" for %GIMP_METADATA_SAVE_COLOR_PROFILE.
* - "include-comment" for %GIMP_METADATA_SAVE_COMMENT.
*
* The values from the [flags@MetadataSaveFlags] will only ever be used
* to set these properties to %FALSE, overriding the user's saved

View file

@ -160,7 +160,7 @@ csource_create_procedure (GimpPlugIn *plug_in,
gimp_procedure_set_argument_sync (procedure, "gimp-comment",
GIMP_ARGUMENT_SYNC_PARASITE);
gimp_procedure_add_boolean_aux_argument (procedure, "save-comment",
gimp_procedure_add_boolean_aux_argument (procedure, "include-comment",
_("Save comment to _file"),
_("Save comment"),
gimp_export_comment (),
@ -524,15 +524,15 @@ export_image (GFile *file,
gdouble config_opacity;
g_object_get (config,
"prefixed-name", &config_prefixed_name,
"gimp-comment", &config_comment,
"save-comment", &config_save_comment,
"glib-types", &config_glib_types,
"save-alpha", &config_save_alpha,
"rgb565", &config_rgb565,
"use-macros", &config_use_macros,
"use-rle", &config_use_rle,
"opacity", &config_opacity,
"prefixed-name", &config_prefixed_name,
"gimp-comment", &config_comment,
"include-comment", &config_save_comment,
"glib-types", &config_glib_types,
"save-alpha", &config_save_alpha,
"rgb565", &config_rgb565,
"use-macros", &config_use_macros,
"use-rle", &config_use_rle,
"opacity", &config_opacity,
NULL);
output = G_OUTPUT_STREAM (g_file_replace (file,
@ -958,7 +958,7 @@ save_dialog (GimpImage *image,
vbox = gimp_procedure_dialog_fill_box (GIMP_PROCEDURE_DIALOG (dialog),
"csource-box",
"prefixed-name", "gimp-comment",
"save-comment", "glib-types",
"include-comment", "glib-types",
"use-macros", "use-rle", "save-alpha",
"rgb565", "opacity",
NULL);

View file

@ -243,7 +243,7 @@ gif_create_procedure (GimpPlugIn *plug_in,
FALSE,
G_PARAM_READWRITE);
gimp_procedure_add_boolean_aux_argument (procedure, "save-comment",
gimp_procedure_add_boolean_aux_argument (procedure, "include-comment",
_("Sa_ve comment"),
_("Save the image comment in the GIF file"),
gimp_export_comment (),
@ -796,7 +796,7 @@ export_image (GFile *file,
"force-delay", &config_use_default_delay,
"force-dispose", &config_use_default_dispose,
"as-animation", &config_as_animation,
"save-comment", &config_save_comment,
"include-comment", &config_save_comment,
"gimp-comment", &config_comment,
NULL);
config_default_dispose =
@ -1305,7 +1305,7 @@ save_dialog (GimpImage *image,
"gimp-comment");
gimp_procedure_dialog_fill_frame (GIMP_PROCEDURE_DIALOG (dialog),
"comment-frame", "save-comment", FALSE,
"comment-frame", "include-comment", FALSE,
"comment-scrolled");
gimp_procedure_dialog_fill (GIMP_PROCEDURE_DIALOG (dialog),

View file

@ -270,7 +270,7 @@ heif_create_procedure (GimpPlugIn *plug_in,
FALSE,
G_PARAM_READWRITE);
gimp_procedure_add_boolean_aux_argument (procedure, "save-color-profile",
gimp_procedure_add_boolean_aux_argument (procedure, "include-color-profile",
_("Save color prof_ile"),
_("Save the image's color profile"),
gimp_export_color_profile (),
@ -302,13 +302,13 @@ heif_create_procedure (GimpPlugIn *plug_in,
"balanced",
G_PARAM_READWRITE);
gimp_procedure_add_boolean_argument (procedure, "save-exif",
gimp_procedure_add_boolean_argument (procedure, "include-exif",
_("Save Exi_f"),
_("Toggle saving Exif data"),
gimp_export_exif (),
G_PARAM_READWRITE);
gimp_procedure_add_boolean_argument (procedure, "save-xmp",
gimp_procedure_add_boolean_argument (procedure, "include-xmp",
_("Save _XMP"),
_("Toggle saving XMP data"),
gimp_export_xmp (),
@ -391,7 +391,7 @@ heif_create_procedure (GimpPlugIn *plug_in,
FALSE,
G_PARAM_READWRITE);
gimp_procedure_add_boolean_aux_argument (procedure, "save-color-profile",
gimp_procedure_add_boolean_aux_argument (procedure, "include-color-profile",
_("Save color prof_ile"),
_("Save the image's color profile"),
gimp_export_color_profile (),
@ -423,13 +423,13 @@ heif_create_procedure (GimpPlugIn *plug_in,
"balanced",
G_PARAM_READWRITE);
gimp_procedure_add_boolean_argument (procedure, "save-exif",
gimp_procedure_add_boolean_argument (procedure, "include-exif",
_("Save Exi_f"),
_("Toggle saving Exif data"),
gimp_export_exif (),
G_PARAM_READWRITE);
gimp_procedure_add_boolean_argument (procedure, "save-xmp",
gimp_procedure_add_boolean_argument (procedure, "include-xmp",
_("Save _XMP"),
_("Toggle saving XMP data"),
gimp_export_xmp (),
@ -1438,9 +1438,9 @@ export_image (GFile *file,
"lossless", &lossless,
"quality", &quality,
"save-bit-depth", &save_bit_depth,
"save-color-profile", &save_profile,
"save-exif", &save_exif,
"save-xmp", &save_xmp,
"include-color-profile", &save_profile,
"include-exif", &save_exif,
"include-xmp", &save_xmp,
NULL);
pixel_format =
gimp_procedure_config_get_choice_id (GIMP_PROCEDURE_CONFIG (config),
@ -2454,8 +2454,8 @@ save_dialog (GimpProcedure *procedure,
"lossless", "quality",
"pixel-format",
"save-bit-depth", "encoder-speed",
"save-color-profile",
"save-exif", "save-xmp", NULL);
"include-color-profile",
"include-exif", "include-xmp", NULL);
run = gimp_procedure_dialog_run (GIMP_PROCEDURE_DIALOG (dialog));

View file

@ -235,13 +235,13 @@ jpegxl_create_procedure (GimpPlugIn *plug_in,
FALSE,
G_PARAM_READWRITE);
gimp_procedure_add_boolean_argument (procedure, "save-exif",
gimp_procedure_add_boolean_argument (procedure, "include-exif",
_("Save Exi_f"),
_("Toggle saving Exif data"),
gimp_export_exif (),
G_PARAM_READWRITE);
gimp_procedure_add_boolean_argument (procedure, "save-xmp",
gimp_procedure_add_boolean_argument (procedure, "include-xmp",
_("Save _XMP"),
_("Toggle saving XMP data"),
gimp_export_xmp (),
@ -1402,8 +1402,8 @@ export_image (GFile *file,
"save-bit-depth", &bit_depth,
"cmyk", &cmyk,
"uses-original-profile", &uses_original_profile,
"save-exif", &save_exif,
"save-xmp", &save_xmp,
"include-exif", &save_exif,
"include-xmp", &save_xmp,
NULL);
speed = gimp_procedure_config_get_choice_id (GIMP_PROCEDURE_CONFIG (config),
"speed");
@ -2093,7 +2093,7 @@ save_dialog (GimpImage *image,
"speed", "save-bit-depth",
"cmyk-frame",
"uses-original-profile",
"save-exif", "save-xmp",
"include-exif", "include-xmp",
NULL);
run = gimp_procedure_dialog_run (GIMP_PROCEDURE_DIALOG (dialog));

View file

@ -1329,22 +1329,22 @@ export_image (GFile *file,
#if !defined(PNG_iCCP_SUPPORTED)
g_object_set (config,
"save-color-profile", FALSE,
"include-color-profile", FALSE,
NULL);
#endif
g_object_get (config,
"interlaced", &save_interlaced,
"bkgd", &save_bkgd,
"offs", &save_offs,
"phys", &save_phys,
"time", &save_time,
"save-comment", &save_comment,
"gimp-comment", &comment,
"save-transparent", &save_transp_pixels,
"optimize-palette", &optimize_palette,
"compression", &compression_level,
"save-color-profile", &save_profile,
"interlaced", &save_interlaced,
"bkgd", &save_bkgd,
"offs", &save_offs,
"phys", &save_phys,
"time", &save_time,
"include-comment", &save_comment,
"gimp-comment", &comment,
"save-transparent", &save_transp_pixels,
"optimize-palette", &optimize_palette,
"compression", &compression_level,
"include-color-profile", &save_profile,
NULL);
export_format = gimp_procedure_config_get_choice_id (GIMP_PROCEDURE_CONFIG (config), "format");

View file

@ -215,7 +215,7 @@ xbm_create_procedure (GimpPlugIn *plug_in,
GIMP_EXPORT_CAN_HANDLE_ALPHA,
NULL, NULL, NULL);
gimp_procedure_add_boolean_argument (procedure, "save-comment",
gimp_procedure_add_boolean_argument (procedure, "include-comment",
_("_Write comment"),
_("Write a comment at the beginning of the file."),
FALSE, /* *NOT* gimp_export_comment() */
@ -967,12 +967,12 @@ export_image (GFile *file,
gint config_y_hot;
g_object_get (config,
"save-comment", &config_save_comment,
"gimp-comment", &config_comment,
"x10-format", &config_x10_format,
"use-hot-spot", &config_use_hot,
"hot-spot-x", &config_x_hot,
"hot-spot-y", &config_y_hot,
"include-comment", &config_save_comment,
"gimp-comment", &config_comment,
"x10-format", &config_x10_format,
"use-hot-spot", &config_use_hot,
"hot-spot-x", &config_x_hot,
"hot-spot-y", &config_y_hot,
NULL);
#if 0
@ -1246,7 +1246,7 @@ save_dialog (GimpImage *image,
gtk_widget_set_margin_end (hint, 24);
frame = gimp_procedure_dialog_fill_frame (GIMP_PROCEDURE_DIALOG (dialog),
"comment-frame", "save-comment",
"comment-frame", "include-comment",
FALSE, "comment-vbox");
/* hotspot toggle */

View file

@ -254,8 +254,8 @@ export_image (GFile *file,
"use-arithmetic-coding", &use_arithmetic_coding,
"use-restart", &use_restart,
"save-color-profile", &save_profile,
"save-comment", &save_comment,
"include-color-profile", &save_profile,
"include-comment", &save_comment,
"gimp-comment", &comment,
NULL);

View file

@ -327,10 +327,10 @@ save_layer (TIFF *tif,
g_object_get (config,
"gimp-comment", &config_comment,
"save-comment", &config_save_comment,
"include-comment", &config_save_comment,
"save-transparent-pixels", &config_save_transp_pixels,
"save-geotiff", &config_save_geotiff_tags,
"save-color-profile", &config_save_profile,
"include-color-profile", &config_save_profile,
"cmyk", &config_cmyk,
NULL);
@ -1064,10 +1064,10 @@ export_image (GFile *file,
gboolean config_cmyk;
g_object_get (config,
"bigtiff", &bigtiff,
"save-color-profile", &config_save_profile,
"save-thumbnail", &config_save_thumbnail,
"cmyk", &config_cmyk,
"bigtiff", &bigtiff,
"include-color-profile", &config_save_profile,
"include-thumbnail", &config_save_thumbnail,
"cmyk", &config_cmyk,
NULL);
layers = gimp_image_list_layers (image);

View file

@ -862,7 +862,7 @@ webp_decide_output (GimpImage *image,
g_return_if_fail (profile && *profile == NULL);
g_object_get (config,
"save-color-profile", &save_profile,
"include-color-profile", &save_profile,
NULL);
*out_linear = FALSE;

View file

@ -354,10 +354,10 @@ webp_export (GimpProcedure *procedure,
/* WebP doesn't support iptc natively and sets it via xmp */
g_object_get (config,
"save-xmp", &save_xmp,
"include-xmp", &save_xmp,
NULL);
g_object_set (config,
"save-iptc", save_xmp,
"include-iptc", save_xmp,
NULL);
gimp_metadata_set_bits_per_sample (metadata, 8);