/* If an existing metadata file exists, we will try writing to
* it's location regardless of the user's preference.
*/
- gchar *metadata_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path);
+ gchar *metadata_path = NULL;
+#ifdef HAVE_EXIV2
+ /* but ignore XMP if we are not able to write it */
+ metadata_path = cache_find_location(CACHE_TYPE_XMP_METADATA, fd->path);
+#endif
if (!metadata_path) metadata_path = cache_find_location(CACHE_TYPE_METADATA, fd->path);
if (metadata_path && !access_file(metadata_path, W_OK))
vbox = scrolled_notebook_page(notebook, _("Metadata"));
-#ifndef HAVE_EXIV2
- gtk_widget_set_sensitive(vbox, FALSE);
-#endif
group = pref_group_new(vbox, FALSE, _("Metadata writing process"), GTK_ORIENTATION_VERTICAL);
+#ifndef HAVE_EXIV2
+ label = pref_label_new(group, _("Warning: Geeqie is built without Exiv2. Some options are disabled."));
+#endif
label = pref_label_new(group, _("Metadata are written in the following order. The process ends after first success."));
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
ct_button = pref_checkbox_new_int(group, _("1) Save metadata in image files, resp. sidecar files, according to the XMP standard"),
options->metadata.save_in_image_file, &c_options->metadata.save_in_image_file);
+#ifndef HAVE_EXIV2
+ gtk_widget_set_sensitive(ct_button, FALSE);
+#endif
pref_checkbox_new_int(group, _("2) Save metadata in '.metadata' folder, local to image folder (non-standard)"),
options->metadata.enable_metadata_dirs, &c_options->metadata.enable_metadata_dirs);
g_free(text);
group = pref_group_new(vbox, FALSE, _("Step 1: Write to image files"), GTK_ORIENTATION_VERTICAL);
+#ifndef HAVE_EXIV2
+ gtk_widget_set_sensitive(group, FALSE);
+#endif
hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
pref_checkbox_link_sensitivity(ct_button, hbox);
options->metadata.confirm_write, &c_options->metadata.confirm_write);
group = pref_group_new(vbox, FALSE, _("Step 2 and 3: write to Geeqie private files"), GTK_ORIENTATION_VERTICAL);
+#ifndef HAVE_EXIV2
+ gtk_widget_set_sensitive(group, FALSE);
+#endif
pref_checkbox_new_int(group, _("Use GQview legacy metadata format (supports only keywords and comments) instead of XMP"),
options->metadata.save_legacy_format, &c_options->metadata.save_legacy_format);
pref_checkbox_new_int(group, _("Allow keywords to differ only in case"),
options->metadata.keywords_case_sensitive, &c_options->metadata.keywords_case_sensitive);
- pref_checkbox_new_int(group, _("Write altered image orientation to the metadata"),
+ ct_button = pref_checkbox_new_int(group, _("Write altered image orientation to the metadata"),
options->metadata.write_orientation, &c_options->metadata.write_orientation);
+#ifndef HAVE_EXIV2
+ gtk_widget_set_sensitive(ct_button, FALSE);
+#endif
group = pref_group_new(vbox, FALSE, _("Auto-save options"), GTK_ORIENTATION_VERTICAL);
static void options_parse_global_end(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, gpointer data, GError **error)
{
+#ifndef HAVE_EXIV2
+ /* some options do not work without exiv2 */
+ options->metadata.save_in_image_file = FALSE;
+ options->metadata.save_legacy_format = TRUE;
+ options->metadata.write_orientation = FALSE;
+ DEBUG_1("compiled without Exiv2 - disabling XMP write support");
+#endif
+
/* on startup there are no layout windows and this just loads the editors */
layout_editors_reload_all();
}