Mercurial > geeqie.yaz
changeset 1244:b2d98b7c26c1
improved metadata preferences
author | nadvornik |
---|---|
date | Tue, 20 Jan 2009 22:53:09 +0000 |
parents | 5106f40597a3 |
children | 13d4501bfa7a |
files | src/metadata.c src/options.c src/options.h src/preferences.c src/rcfile.c |
diffstat | 5 files changed, 22 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/metadata.c Tue Jan 20 22:29:31 2009 +0000 +++ b/src/metadata.c Tue Jan 20 22:53:09 2009 +0000 @@ -64,7 +64,7 @@ metadata_write_idle_id = -1; } - if (options->metadata.confirm_timeout > 0) + if (options->metadata.confirm_after_timeout) { metadata_write_idle_id = g_timeout_add(options->metadata.confirm_timeout * 1000, metadata_write_queue_idle_cb, NULL); }
--- a/src/options.c Tue Jan 20 22:29:31 2009 +0000 +++ b/src/options.c Tue Jan 20 22:53:09 2009 +0000 @@ -143,7 +143,8 @@ 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_after_timeout = FALSE; + options->metadata.confirm_timeout = 10; options->metadata.confirm_on_image_change = FALSE; options->metadata.confirm_on_dir_change = TRUE;
--- a/src/options.h Tue Jan 20 22:29:31 2009 +0000 +++ b/src/options.h Tue Jan 20 22:53:09 2009 +0000 @@ -269,6 +269,7 @@ gboolean confirm_write; gint confirm_timeout; + gboolean confirm_after_timeout; gboolean confirm_on_image_change; gboolean confirm_on_dir_change; } metadata;
--- a/src/preferences.c Tue Jan 20 22:29:31 2009 +0000 +++ b/src/preferences.c Tue Jan 20 22:53:09 2009 +0000 @@ -346,6 +346,7 @@ options->metadata.sync_grouped_files = c_options->metadata.sync_grouped_files; options->metadata.confirm_write = c_options->metadata.confirm_write; options->metadata.confirm_timeout = c_options->metadata.confirm_timeout; + options->metadata.confirm_after_timeout = c_options->metadata.confirm_after_timeout; options->metadata.confirm_on_image_change = c_options->metadata.confirm_on_image_change; options->metadata.confirm_on_dir_change = c_options->metadata.confirm_on_dir_change; @@ -1669,25 +1670,34 @@ pref_checkbox_new_int(group, _("Store metadata and cache files in source image's directory"), 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"), + ct_button = pref_checkbox_new_int(group, _("Store keywords and comments as XMP tags in image files"), options->metadata.save_in_image_file, &c_options->metadata.save_in_image_file); - pref_checkbox_new_int(group, _("Store keywords and comments also in legacy IPTC tags"), + hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_VERTICAL, PREF_PAD_SPACE); + pref_checkbox_link_sensitivity(ct_button, hbox); + + pref_checkbox_new_int(hbox, _("Store keywords and comments also in legacy IPTC tags"), options->metadata.save_legacy_IPTC, &c_options->metadata.save_legacy_IPTC); - pref_checkbox_new_int(group, _("Warn if the image files are unwritable"), + pref_checkbox_new_int(hbox, _("Warn if the image files are unwritable"), options->metadata.warn_on_write_problems, &c_options->metadata.warn_on_write_problems); + pref_checkbox_new_int(hbox, _("Ask before writing to image files"), + options->metadata.confirm_write, &c_options->metadata.confirm_write); + pref_checkbox_new_int(group, _("Save metadata in GQview legacy metadata format"), options->metadata.save_legacy_format, &c_options->metadata.save_legacy_format); pref_checkbox_new_int(group, _("Write the same keywords and comment to all files in a group"), options->metadata.sync_grouped_files, &c_options->metadata.sync_grouped_files); - pref_checkbox_new_int(group, _("Ask before writing to image files"), - options->metadata.confirm_write, &c_options->metadata.confirm_write); + ct_button = pref_checkbox_new_int(group, _("Write metadata after timeout"), + options->metadata.confirm_after_timeout, &c_options->metadata.confirm_after_timeout); - pref_spin_new_int(group, _("Write metadata after timeout (seconds):"), NULL, 0, 900, 1, + hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_SPACE); + pref_checkbox_link_sensitivity(ct_button, hbox); + + pref_spin_new_int(hbox, _("Timeout (seconds):"), NULL, 0, 900, 1, options->metadata.confirm_timeout, &c_options->metadata.confirm_timeout); pref_checkbox_new_int(group, _("Write metadata on image change"),
--- a/src/rcfile.c Tue Jan 20 22:29:31 2009 +0000 +++ b/src/rcfile.c Tue Jan 20 22:53:09 2009 +0000 @@ -547,6 +547,7 @@ WRITE_BOOL(metadata.sync_grouped_files); WRITE_BOOL(metadata.confirm_write); WRITE_INT(metadata.confirm_timeout); + WRITE_BOOL(metadata.confirm_after_timeout); WRITE_BOOL(metadata.confirm_on_image_change); WRITE_BOOL(metadata.confirm_on_dir_change); @@ -914,6 +915,7 @@ READ_BOOL(metadata.save_legacy_format); READ_BOOL(metadata.sync_grouped_files); READ_BOOL(metadata.confirm_write); + READ_BOOL(metadata.confirm_after_timeout); READ_INT(metadata.confirm_timeout); READ_BOOL(metadata.confirm_on_image_change); READ_BOOL(metadata.confirm_on_dir_change);