+/*
+ *-----------------------------------------------------------------------------
+ * write fuctions for elements (private)
+ *-----------------------------------------------------------------------------
+ */
+
+static void write_global_attributes(GString *outstr, gint indent)
+{
+ /* General Options */
+ WRITE_NL(); WRITE_BOOL(*options, show_icon_names);
+ WRITE_SEPARATOR();
+
+ WRITE_NL(); WRITE_BOOL(*options, tree_descend_subdirs);
+ WRITE_NL(); WRITE_BOOL(*options, view_dir_list_single_click_enter);
+ WRITE_NL(); WRITE_BOOL(*options, lazy_image_sync);
+ WRITE_NL(); WRITE_BOOL(*options, update_on_time_change);
+ WRITE_SEPARATOR();
+
+ WRITE_NL(); WRITE_BOOL(*options, progressive_key_scrolling);
+ WRITE_NL(); WRITE_UINT(*options, keyboard_scroll_step);
+
+ WRITE_NL(); WRITE_UINT(*options, duplicates_similarity_threshold);
+ WRITE_NL(); WRITE_UINT(*options, duplicates_match);
+ WRITE_NL(); WRITE_UINT(*options, duplicates_select_type);
+ WRITE_NL(); WRITE_BOOL(*options, duplicates_thumbnails);
+ WRITE_NL(); WRITE_BOOL(*options, rot_invariant_sim);
+ WRITE_SEPARATOR();
+
+ WRITE_NL(); WRITE_BOOL(*options, mousewheel_scrolls);
+ WRITE_NL(); WRITE_BOOL(*options, image_lm_click_nav);
+ WRITE_NL(); WRITE_INT(*options, open_recent_list_maxsize);
+ WRITE_NL(); WRITE_INT(*options, dnd_icon_size);
+ WRITE_NL(); WRITE_BOOL(*options, place_dialogs_under_mouse);
+
+ WRITE_NL(); WRITE_BOOL(*options, save_window_positions);
+ WRITE_NL(); WRITE_BOOL(*options, use_saved_window_positions_for_new_windows);
+ WRITE_NL(); WRITE_BOOL(*options, tools_restore_state);
+
+ /* File operations Options */
+ WRITE_NL(); WRITE_BOOL(*options, file_ops.enable_in_place_rename);
+ WRITE_NL(); WRITE_BOOL(*options, file_ops.confirm_delete);
+ WRITE_NL(); WRITE_BOOL(*options, file_ops.enable_delete_key);
+ WRITE_NL(); WRITE_BOOL(*options, file_ops.safe_delete_enable);
+ WRITE_NL(); WRITE_CHAR(*options, file_ops.safe_delete_path);
+ WRITE_NL(); WRITE_INT(*options, file_ops.safe_delete_folder_maxsize);
+
+ /* Properties dialog Options */
+ WRITE_NL(); WRITE_CHAR(*options, properties.tabs_order);
+
+ /* Image Options */
+ WRITE_NL(); WRITE_UINT(*options, image.zoom_mode);
+
+ WRITE_SEPARATOR();
+ WRITE_NL(); WRITE_BOOL(*options, image.zoom_2pass);
+ WRITE_NL(); WRITE_BOOL(*options, image.zoom_to_fit_allow_expand);
+ WRITE_NL(); WRITE_UINT(*options, image.zoom_quality);
+ WRITE_NL(); WRITE_INT(*options, image.zoom_increment);
+ WRITE_NL(); WRITE_BOOL(*options, image.fit_window_to_image);
+ WRITE_NL(); WRITE_BOOL(*options, image.limit_window_size);
+ WRITE_NL(); WRITE_INT(*options, image.max_window_size);
+ WRITE_NL(); WRITE_BOOL(*options, image.limit_autofit_size);
+ WRITE_NL(); WRITE_INT(*options, image.max_autofit_size);
+ WRITE_NL(); WRITE_INT(*options, image.max_enlargement_size);
+ WRITE_NL(); WRITE_UINT(*options, image.scroll_reset_method);
+ WRITE_NL(); WRITE_INT(*options, image.tile_cache_max);
+ WRITE_NL(); WRITE_INT(*options, image.image_cache_max);
+ WRITE_NL(); WRITE_BOOL(*options, image.enable_read_ahead);
+ WRITE_NL(); WRITE_BOOL(*options, image.exif_rotate_enable);
+ WRITE_NL(); WRITE_BOOL(*options, image.use_custom_border_color);
+ WRITE_NL(); WRITE_BOOL(*options, image.use_custom_border_color_in_fullscreen);
+ WRITE_NL(); WRITE_COLOR(*options, image.border_color);
+ WRITE_NL(); WRITE_COLOR(*options, image.alpha_color_1);
+ WRITE_NL(); WRITE_COLOR(*options, image.alpha_color_2);
+ WRITE_NL(); WRITE_BOOL(*options, image.use_clutter_renderer);
+
+ /* Thumbnails Options */
+ WRITE_NL(); WRITE_INT(*options, thumbnails.max_width);
+ WRITE_NL(); WRITE_INT(*options, thumbnails.max_height);
+ WRITE_NL(); WRITE_BOOL(*options, thumbnails.enable_caching);
+ WRITE_NL(); WRITE_BOOL(*options, thumbnails.cache_into_dirs);
+ WRITE_NL(); WRITE_BOOL(*options, thumbnails.use_xvpics);
+ WRITE_NL(); WRITE_BOOL(*options, thumbnails.spec_standard);
+ WRITE_NL(); WRITE_UINT(*options, thumbnails.quality);
+ WRITE_NL(); WRITE_BOOL(*options, thumbnails.use_exif);
+
+ /* File sorting Options */
+ WRITE_NL(); WRITE_INT(*options, file_sort.method);
+ WRITE_NL(); WRITE_BOOL(*options, file_sort.ascending);
+ WRITE_NL(); WRITE_BOOL(*options, file_sort.case_sensitive);
+ WRITE_NL(); WRITE_BOOL(*options, file_sort.natural);
+
+ /* Fullscreen Options */
+ WRITE_NL(); WRITE_INT(*options, fullscreen.screen);
+ WRITE_NL(); WRITE_BOOL(*options, fullscreen.clean_flip);
+ WRITE_NL(); WRITE_BOOL(*options, fullscreen.disable_saver);
+ WRITE_NL(); WRITE_BOOL(*options, fullscreen.above);
+
+ WRITE_SEPARATOR();
+
+ /* Image Overlay Options */
+ WRITE_NL(); WRITE_CHAR(*options, image_overlay.template_string);
+
+ WRITE_NL(); WRITE_INT(*options, image_overlay.x);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.y);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.text_red);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.text_green);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.text_blue);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.text_alpha);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.background_red);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.background_green);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.background_blue);
+ WRITE_NL(); WRITE_INT(*options, image_overlay.background_alpha);
+ WRITE_NL(); WRITE_CHAR(*options, image_overlay.font);
+
+ /* Slideshow Options */
+ WRITE_NL(); WRITE_INT_UNIT(*options, slideshow.delay, SLIDESHOW_SUBSECOND_PRECISION);
+ WRITE_NL(); WRITE_BOOL(*options, slideshow.random);
+ WRITE_NL(); WRITE_BOOL(*options, slideshow.repeat);
+
+ /* Collection Options */
+ WRITE_NL(); WRITE_BOOL(*options, collections.rectangular_selection);
+
+ /* Filtering Options */
+ WRITE_NL(); WRITE_BOOL(*options, file_filter.show_hidden_files);
+ WRITE_NL(); WRITE_BOOL(*options, file_filter.show_parent_directory);
+ WRITE_NL(); WRITE_BOOL(*options, file_filter.show_dot_directory);
+ WRITE_NL(); WRITE_BOOL(*options, file_filter.disable_file_extension_checks);
+ WRITE_NL(); WRITE_BOOL(*options, file_filter.disable);
+ WRITE_SEPARATOR();
+
+ /* Sidecars Options */
+ WRITE_NL(); WRITE_CHAR(*options, sidecar.ext);
+
+ /* Shell command */
+ WRITE_NL(); WRITE_CHAR(*options, shell.path);
+ WRITE_NL(); WRITE_CHAR(*options, shell.options);
+
+ /* Helpers */
+ WRITE_NL(); WRITE_CHAR(*options, helpers.html_browser.command_name);
+ WRITE_NL(); WRITE_CHAR(*options, helpers.html_browser.command_line);
+
+ /* Metadata Options */
+ WRITE_NL(); WRITE_BOOL(*options, metadata.enable_metadata_dirs);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.save_in_image_file);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.save_legacy_IPTC);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.warn_on_write_problems);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.save_legacy_format);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.sync_grouped_files);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.confirm_write);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.sidecar_extended_name);
+ WRITE_NL(); WRITE_INT(*options, metadata.confirm_timeout);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.confirm_after_timeout);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.confirm_on_image_change);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.confirm_on_dir_change);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.keywords_case_sensitive);
+ WRITE_NL(); WRITE_BOOL(*options, metadata.write_orientation);
+
+ WRITE_NL(); WRITE_INT(*options, stereo.mode);
+ WRITE_NL(); WRITE_INT(*options, stereo.fsmode);
+ WRITE_NL(); WRITE_BOOL(*options, stereo.enable_fsmode);
+ WRITE_NL(); WRITE_INT(*options, stereo.fixed_w);
+ WRITE_NL(); WRITE_INT(*options, stereo.fixed_h);
+ WRITE_NL(); WRITE_INT(*options, stereo.fixed_x1);
+ WRITE_NL(); WRITE_INT(*options, stereo.fixed_y1);
+ WRITE_NL(); WRITE_INT(*options, stereo.fixed_x2);
+ WRITE_NL(); WRITE_INT(*options, stereo.fixed_y2);
+}
+
+static void write_color_profile(GString *outstr, gint indent)
+{
+ gint i;
+#ifndef HAVE_LCMS
+ g_string_append_printf(outstr, "<!-- NOTICE: %s was not built with support for color profiles,\n"
+ " color profile options will have no effect.\n-->\n", GQ_APPNAME);
+#endif
+
+ WRITE_NL(); WRITE_STRING("<color_profiles ");
+ WRITE_CHAR(options->color_profile, screen_file);
+ WRITE_BOOL(options->color_profile, enabled);
+ WRITE_BOOL(options->color_profile, use_image);
+ WRITE_INT(options->color_profile, input_type);
+ WRITE_BOOL(options->color_profile, use_x11_screen_profile);
+ WRITE_INT(options->color_profile, render_intent);
+ WRITE_STRING(">");
+
+ indent++;
+ for (i = 0; i < COLOR_PROFILE_INPUTS; i++)
+ {
+ WRITE_NL(); WRITE_STRING("<profile ");
+ write_char_option(outstr, indent, "input_file", options->color_profile.input_file[i]);
+ write_char_option(outstr, indent, "input_name", options->color_profile.input_name[i]);
+ WRITE_STRING("/>");
+ }
+ indent--;
+ WRITE_NL(); WRITE_STRING("</color_profiles>");
+}
+