Mercurial > geeqie
changeset 1208:c45cc5cf3c4d
added options for metadata - not yet used
author | nadvornik |
---|---|
date | Sat, 20 Dec 2008 23:18:20 +0000 |
parents | 4742b47b75d1 |
children | 0b459cc6cc1e |
files | src/cache.c src/metadata.c src/options.c src/options.h src/preferences.c src/rcfile.c |
diffstat | 6 files changed, 61 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cache.c Sat Dec 20 21:47:04 2008 +0000 +++ b/src/cache.c Sat Dec 20 23:18:20 2008 +0000 @@ -626,7 +626,7 @@ } if (((type != CACHE_TYPE_METADATA && options->thumbnails.cache_into_dirs) || - (type == CACHE_TYPE_METADATA && options->enable_metadata_dirs)) && + (type == CACHE_TYPE_METADATA && options->metadata.enable_metadata_dirs)) && access_file(base, W_OK)) { path = g_build_filename(base, cache_local, name, NULL); @@ -681,7 +681,7 @@ if (type == CACHE_TYPE_METADATA) { - prefer_local = options->enable_metadata_dirs; + prefer_local = options->metadata.enable_metadata_dirs; } else {
--- a/src/metadata.c Sat Dec 20 21:47:04 2008 +0000 +++ b/src/metadata.c Sat Dec 20 23:18:20 2008 +0000 @@ -87,7 +87,7 @@ gboolean metadata_write_perform(FileData *fd) { - if (options->save_metadata_in_image_file && + if (options->metadata.save_in_image_file && exif_write_fd(fd)) { metadata_legacy_delete(fd);
--- a/src/options.c Sat Dec 20 21:47:04 2008 +0000 +++ b/src/options.c Sat Dec 20 23:18:20 2008 +0000 @@ -41,7 +41,6 @@ options->documentation.htmldir = NULL; options->documentation.helpdir = NULL; options->duplicates_similarity_threshold = 99; - options->enable_metadata_dirs = FALSE; options->file_filter.disable = FALSE; options->file_filter.show_dot_directory = FALSE; @@ -137,7 +136,16 @@ options->progressive_key_scrolling = TRUE; - options->save_metadata_in_image_file = FALSE; + options->metadata.enable_metadata_dirs = FALSE; + options->metadata.save_in_image_file = FALSE; + options->metadata.save_legacy_IPTC = FALSE; + options->metadata.warn_on_write_problems = TRUE; + options->metadata.save_legacy_format = FALSE; + options->metadata.sync_grouped_files = TRUE; + options->metadata.confirm_write = TRUE; + options->metadata.confirm_timeout = 0; + options->metadata.confirm_on_image_change = FALSE; + options->metadata.confirm_on_dir_change = TRUE; options->show_copy_path = TRUE; options->show_icon_names = TRUE;
--- a/src/options.h Sat Dec 20 21:47:04 2008 +0000 +++ b/src/options.h Sat Dec 20 23:18:20 2008 +0000 @@ -24,8 +24,6 @@ gboolean show_copy_path; /* various */ - gboolean enable_metadata_dirs; - gboolean tree_descend_subdirs; gboolean lazy_image_sync; @@ -36,7 +34,6 @@ gint open_recent_list_maxsize; gint dnd_icon_size; - gboolean save_metadata_in_image_file; /* start up */ struct { @@ -253,6 +250,25 @@ gchar *helpdir; gchar *htmldir; } documentation; + + /* Metadata */ + struct { + gboolean enable_metadata_dirs; + + gboolean save_in_image_file; + gboolean save_legacy_IPTC; + gboolean warn_on_write_problems; + + gboolean save_legacy_format; + + gboolean sync_grouped_files; + + gboolean confirm_write; + gint confirm_timeout; + gboolean confirm_on_image_change; + gboolean confirm_on_dir_change; + } metadata; + }; ConfOptions *options;
--- a/src/preferences.c Sat Dec 20 21:47:04 2008 +0000 +++ b/src/preferences.c Sat Dec 20 23:18:20 2008 +0000 @@ -260,7 +260,7 @@ options->thumbnails.use_xvpics = c_options->thumbnails.use_xvpics; #endif options->thumbnails.spec_standard = c_options->thumbnails.spec_standard; - options->enable_metadata_dirs = c_options->enable_metadata_dirs; + options->metadata.enable_metadata_dirs = c_options->metadata.enable_metadata_dirs; options->file_filter.show_hidden_files = c_options->file_filter.show_hidden_files; options->file_filter.show_dot_directory = c_options->file_filter.show_dot_directory; @@ -326,7 +326,7 @@ layout_copy_path_update_all(); } - options->save_metadata_in_image_file = c_options->save_metadata_in_image_file; + options->metadata.save_in_image_file = c_options->metadata.save_in_image_file; #ifdef DEBUG set_debug_level(debug_c); @@ -1510,10 +1510,10 @@ group = pref_group_new(vbox, FALSE, _("Miscellaneous"), GTK_ORIENTATION_VERTICAL); pref_checkbox_new_int(group, _("Store metadata and cache files in source image's directory"), - options->enable_metadata_dirs, &c_options->enable_metadata_dirs); + options->metadata.enable_metadata_dirs, &c_options->metadata.enable_metadata_dirs); pref_checkbox_new_int(group, _("Store keywords and comments as XMP tags in image files"), - options->save_metadata_in_image_file, &c_options->save_metadata_in_image_file); + options->metadata.save_in_image_file, &c_options->metadata.save_in_image_file); pref_spin_new_int(group, _("Custom similarity threshold:"), NULL, 0, 100, 1, options->duplicates_similarity_threshold, (int *)&c_options->duplicates_similarity_threshold);
--- a/src/rcfile.c Sat Dec 20 21:47:04 2008 +0000 +++ b/src/rcfile.c Sat Dec 20 23:18:20 2008 +0000 @@ -274,8 +274,6 @@ WRITE_SEPARATOR(); WRITE_BOOL(progressive_key_scrolling); - WRITE_BOOL(enable_metadata_dirs); - WRITE_BOOL(save_metadata_in_image_file); WRITE_UINT(duplicates_similarity_threshold); WRITE_SEPARATOR(); @@ -541,6 +539,18 @@ write_int_option(ssi, (gchar *)ExifUIList[i].key, ExifUIList[i].current); } + WRITE_SUBTITLE("Metadata Options"); + WRITE_BOOL(metadata.enable_metadata_dirs); + WRITE_BOOL(metadata.save_in_image_file); + WRITE_BOOL(metadata.save_legacy_IPTC); + WRITE_BOOL(metadata.warn_on_write_problems); + WRITE_BOOL(metadata.save_legacy_format); + WRITE_BOOL(metadata.sync_grouped_files); + WRITE_BOOL(metadata.confirm_write); + WRITE_INT(metadata.confirm_timeout); + WRITE_BOOL(metadata.confirm_on_image_change); + WRITE_BOOL(metadata.confirm_on_dir_change); + WRITE_SUBTITLE("Documentation Options"); WRITE_CHAR(documentation.helpdir); WRITE_CHAR(documentation.htmldir); @@ -663,9 +673,6 @@ READ_BOOL(progressive_key_scrolling); - READ_BOOL(enable_metadata_dirs); - READ_BOOL(save_metadata_in_image_file); - READ_BOOL(mousewheel_scrolls); READ_INT(open_recent_list_maxsize); @@ -901,7 +908,19 @@ ExifUIList[i].current = strtol(value, NULL, 10); continue; } - + + /* metadata */ + COMPAT_READ_BOOL(enable_metadata_dirs, metadata.enable_metadata_dirs); + COMPAT_READ_BOOL(save_metadata_in_image_file, metadata.save_in_image_file); /* 2008/12/20 */ + READ_BOOL(metadata.save_legacy_IPTC); + READ_BOOL(metadata.warn_on_write_problems); + READ_BOOL(metadata.save_legacy_format); + READ_BOOL(metadata.sync_grouped_files); + READ_BOOL(metadata.confirm_write); + READ_INT(metadata.confirm_timeout); + READ_BOOL(metadata.confirm_on_image_change); + READ_BOOL(metadata.confirm_on_dir_change); + /* Documentation */ READ_CHAR(documentation.helpdir); READ_CHAR(documentation.htmldir);