Commit c49b8463 authored by Jehan's avatar Jehan

app: adding metadata handling as "Export Policies" in preferences.

These preferences are currently not used anywhere. This is the next
step.
parent 1a231150
......@@ -110,6 +110,9 @@ enum
PROP_IMPORT_PROMOTE_DITHER,
PROP_IMPORT_ADD_ALPHA,
PROP_IMPORT_RAW_PLUG_IN,
PROP_EXPORT_METADATA_EXIF,
PROP_EXPORT_METADATA_XMP,
PROP_EXPORT_METADATA_IPTC,
/* ignored, only for backward compatibility: */
PROP_INSTALL_COLORMAP,
......@@ -630,6 +633,27 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_METADATA_EXIF,
"export-metadata-exif",
"Export Exif metadata",
EXPORT_METADATA_EXIF_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_METADATA_XMP,
"export-metadata-xmp",
"Export XMP metadata",
EXPORT_METADATA_XMP_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_EXPORT_METADATA_IPTC,
"export-metadata-iptc",
"Export IPTC metadata",
EXPORT_METADATA_IPTC_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
/* only for backward compatibility: */
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_INSTALL_COLORMAP,
"install-colormap",
......@@ -923,6 +947,15 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->import_raw_plug_in);
core_config->import_raw_plug_in = g_value_dup_string (value);
break;
case PROP_EXPORT_METADATA_EXIF:
core_config->export_metadata_exif = g_value_get_boolean (value);
break;
case PROP_EXPORT_METADATA_XMP:
core_config->export_metadata_xmp = g_value_get_boolean (value);
break;
case PROP_EXPORT_METADATA_IPTC:
core_config->export_metadata_iptc = g_value_get_boolean (value);
break;
case PROP_INSTALL_COLORMAP:
case PROP_MIN_COLORS:
......@@ -1110,6 +1143,15 @@ gimp_core_config_get_property (GObject *object,
case PROP_IMPORT_RAW_PLUG_IN:
g_value_set_string (value, core_config->import_raw_plug_in);
break;
case PROP_EXPORT_METADATA_EXIF:
g_value_set_boolean (value, core_config->export_metadata_exif);
break;
case PROP_EXPORT_METADATA_XMP:
g_value_set_boolean (value, core_config->export_metadata_xmp);
break;
case PROP_EXPORT_METADATA_IPTC:
g_value_set_boolean (value, core_config->export_metadata_iptc);
break;
case PROP_INSTALL_COLORMAP:
case PROP_MIN_COLORS:
......
......@@ -95,6 +95,9 @@ struct _GimpCoreConfig
gboolean import_promote_dither;
gboolean import_add_alpha;
gchar *import_raw_plug_in;
gboolean export_metadata_exif;
gboolean export_metadata_xmp;
gboolean export_metadata_iptc;
};
struct _GimpCoreConfigClass
......
......@@ -201,6 +201,15 @@ _("Add an alpha channel to all layers of imported images.")
#define IMPORT_RAW_PLUG_IN_BLURB \
_("Which plug-in to use for importing raw digital camera files.")
#define EXPORT_METADATA_EXIF_BLURB \
_("Export Exif metadata by default.")
#define EXPORT_METADATA_XMP_BLURB \
_("Export XMP metadata by default.")
#define EXPORT_METADATA_IPTC_BLURB \
_("Export IPTC metadata by default.")
#define INITIAL_ZOOM_TO_FIT_BLURB \
_("When enabled, this will ensure that the full image is visible after a " \
"file is opened, otherwise it will be displayed with a scale of 1:1.")
......
......@@ -1402,7 +1402,7 @@ prefs_dialog_new (Gimp *gimp,
vbox = gimp_prefs_box_add_page (GIMP_PREFS_BOX (prefs_box),
"gimp-prefs-import-export",
_("Image Import & Export"),
_("Image Import"),
_("Image Import & Export"),
GIMP_HELP_PREFS_DIALOG,
NULL,
&top_iter);
......@@ -1431,6 +1431,24 @@ prefs_dialog_new (Gimp *gimp,
_("Color profile policy:"),
GTK_TABLE (table), 0, NULL);
/* Export Policies */
vbox2 = prefs_frame_new (_("Export Policies"),
GTK_CONTAINER (vbox), FALSE);
button = prefs_check_button_add (object, "export-metadata-exif",
_("Export Exif metadata by default when available"),
GTK_BOX (vbox2));
button = prefs_check_button_add (object, "export-metadata-xmp",
_("Export XMP metadata by default when available"),
GTK_BOX (vbox2));
button = prefs_check_button_add (object, "export-metadata-iptc",
_("Export IPTC metadata by default when available"),
GTK_BOX (vbox2));
hbox = prefs_hint_box_new (GIMP_ICON_DIALOG_WARNING,
_("Metadata can contain sensitive information."));
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
/* Raw Image Importer */
vbox2 = prefs_frame_new (_("Raw Image Importer"),
GTK_CONTAINER (vbox), TRUE);
......
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