comparison src/preferences.c @ 1686:59c72fd324ce

fixes for a built without Exiv2 don't try to access XMP metadata if not compiled with Exiv2 some metadata options are valid without Exiv2, do not disable them
author nadvornik
date Tue, 30 Jun 2009 20:12:28 +0000
parents 47b191b77e07
children 956aab097ea7
comparison
equal deleted inserted replaced
1685:47b191b77e07 1686:59c72fd324ce
1592 GtkWidget *label; 1592 GtkWidget *label;
1593 gchar *text; 1593 gchar *text;
1594 1594
1595 vbox = scrolled_notebook_page(notebook, _("Metadata")); 1595 vbox = scrolled_notebook_page(notebook, _("Metadata"));
1596 1596
1597
1598 group = pref_group_new(vbox, FALSE, _("Metadata writing process"), GTK_ORIENTATION_VERTICAL);
1597 #ifndef HAVE_EXIV2 1599 #ifndef HAVE_EXIV2
1598 gtk_widget_set_sensitive(vbox, FALSE); 1600 label = pref_label_new(group, _("Warning: Geeqie is built without Exiv2. Some options are disabled."));
1599 #endif 1601 #endif
1600
1601 group = pref_group_new(vbox, FALSE, _("Metadata writing process"), GTK_ORIENTATION_VERTICAL);
1602 label = pref_label_new(group, _("Metadata are written in the following order. The process ends after first success.")); 1602 label = pref_label_new(group, _("Metadata are written in the following order. The process ends after first success."));
1603 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); 1603 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
1604 1604
1605 ct_button = pref_checkbox_new_int(group, _("1) Save metadata in image files, resp. sidecar files, according to the XMP standard"), 1605 ct_button = pref_checkbox_new_int(group, _("1) Save metadata in image files, resp. sidecar files, according to the XMP standard"),
1606 options->metadata.save_in_image_file, &c_options->metadata.save_in_image_file); 1606 options->metadata.save_in_image_file, &c_options->metadata.save_in_image_file);
1607 #ifndef HAVE_EXIV2
1608 gtk_widget_set_sensitive(ct_button, FALSE);
1609 #endif
1607 1610
1608 pref_checkbox_new_int(group, _("2) Save metadata in '.metadata' folder, local to image folder (non-standard)"), 1611 pref_checkbox_new_int(group, _("2) Save metadata in '.metadata' folder, local to image folder (non-standard)"),
1609 options->metadata.enable_metadata_dirs, &c_options->metadata.enable_metadata_dirs); 1612 options->metadata.enable_metadata_dirs, &c_options->metadata.enable_metadata_dirs);
1610 1613
1611 text = g_strdup_printf(_("3) Save metadata in Geeqie private directory '%s'"), get_metadata_cache_dir()); 1614 text = g_strdup_printf(_("3) Save metadata in Geeqie private directory '%s'"), get_metadata_cache_dir());
1612 label = pref_label_new(group, text); 1615 label = pref_label_new(group, text);
1613 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); 1616 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
1614 g_free(text); 1617 g_free(text);
1615 1618
1616 group = pref_group_new(vbox, FALSE, _("Step 1: Write to image files"), GTK_ORIENTATION_VERTICAL); 1619 group = pref_group_new(vbox, FALSE, _("Step 1: Write to image files"), GTK_ORIENTATION_VERTICAL);
1620 #ifndef HAVE_EXIV2
1621 gtk_widget_set_sensitive(group, FALSE);
1622 #endif
1617 1623
1618 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE); 1624 hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE);
1619 pref_checkbox_link_sensitivity(ct_button, hbox); 1625 pref_checkbox_link_sensitivity(ct_button, hbox);
1620 1626
1621 pref_checkbox_new_int(hbox, _("Store metadata also in legacy IPTC tags (converted according to IPTC4XMP standard)"), 1627 pref_checkbox_new_int(hbox, _("Store metadata also in legacy IPTC tags (converted according to IPTC4XMP standard)"),
1626 1632
1627 pref_checkbox_new_int(hbox, _("Ask before writing to image files"), 1633 pref_checkbox_new_int(hbox, _("Ask before writing to image files"),
1628 options->metadata.confirm_write, &c_options->metadata.confirm_write); 1634 options->metadata.confirm_write, &c_options->metadata.confirm_write);
1629 1635
1630 group = pref_group_new(vbox, FALSE, _("Step 2 and 3: write to Geeqie private files"), GTK_ORIENTATION_VERTICAL); 1636 group = pref_group_new(vbox, FALSE, _("Step 2 and 3: write to Geeqie private files"), GTK_ORIENTATION_VERTICAL);
1637 #ifndef HAVE_EXIV2
1638 gtk_widget_set_sensitive(group, FALSE);
1639 #endif
1631 1640
1632 pref_checkbox_new_int(group, _("Use GQview legacy metadata format (supports only keywords and comments) instead of XMP"), 1641 pref_checkbox_new_int(group, _("Use GQview legacy metadata format (supports only keywords and comments) instead of XMP"),
1633 options->metadata.save_legacy_format, &c_options->metadata.save_legacy_format); 1642 options->metadata.save_legacy_format, &c_options->metadata.save_legacy_format);
1634 1643
1635 1644
1638 options->metadata.sync_grouped_files, &c_options->metadata.sync_grouped_files); 1647 options->metadata.sync_grouped_files, &c_options->metadata.sync_grouped_files);
1639 1648
1640 pref_checkbox_new_int(group, _("Allow keywords to differ only in case"), 1649 pref_checkbox_new_int(group, _("Allow keywords to differ only in case"),
1641 options->metadata.keywords_case_sensitive, &c_options->metadata.keywords_case_sensitive); 1650 options->metadata.keywords_case_sensitive, &c_options->metadata.keywords_case_sensitive);
1642 1651
1643 pref_checkbox_new_int(group, _("Write altered image orientation to the metadata"), 1652 ct_button = pref_checkbox_new_int(group, _("Write altered image orientation to the metadata"),
1644 options->metadata.write_orientation, &c_options->metadata.write_orientation); 1653 options->metadata.write_orientation, &c_options->metadata.write_orientation);
1654 #ifndef HAVE_EXIV2
1655 gtk_widget_set_sensitive(ct_button, FALSE);
1656 #endif
1645 1657
1646 group = pref_group_new(vbox, FALSE, _("Auto-save options"), GTK_ORIENTATION_VERTICAL); 1658 group = pref_group_new(vbox, FALSE, _("Auto-save options"), GTK_ORIENTATION_VERTICAL);
1647 1659
1648 ct_button = pref_checkbox_new_int(group, _("Write metadata after timeout"), 1660 ct_button = pref_checkbox_new_int(group, _("Write metadata after timeout"),
1649 options->metadata.confirm_after_timeout, &c_options->metadata.confirm_after_timeout); 1661 options->metadata.confirm_after_timeout, &c_options->metadata.confirm_after_timeout);