/*
* Geeqie
* (C) 2006 John Ellis
- * Copyright (C) 2008 - 2009 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
*
* Author: John Ellis
*
#include "layout_util.h"
#include "bar.h"
#include "metadata.h"
+#include "bar_gps.h"
/*
g_free(escval1);
}
+/* dummy read for old/obsolete/futur/deprecated/unused options */
+gboolean read_dummy_option(const gchar *option, const gchar *label, const gchar *message)
+{
+ if (g_ascii_strcasecmp(option, label) != 0) return FALSE;
+ log_printf(_("Option %s ignored: %s\n"), option, message);
+ return TRUE;
+}
+
+
gboolean read_char_option(const gchar *option, const gchar *label, const gchar *value, gchar **text)
{
if (g_ascii_strcasecmp(option, label) != 0) return FALSE;
// WRITE_SUBTITLE("General Options");
WRITE_NL(); WRITE_BOOL(*options, show_icon_names);
- WRITE_NL(); WRITE_BOOL(*options, show_copy_path);
WRITE_SEPARATOR();
WRITE_NL(); WRITE_BOOL(*options, tree_descend_subdirs);
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_UINT(*options, image.dither_quality);
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_INT(*options, image.read_buffer_size);
- WRITE_NL(); WRITE_INT(*options, image.idle_read_loop_count);
+ WRITE_NL(); WRITE_BOOL(*options, image.use_clutter_renderer);
// WRITE_SUBTITLE("Thumbnails Options");
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.fast);
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, 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)
#endif
WRITE_NL(); WRITE_STRING("<color_profiles ");
- WRITE_INT(options->color_profile, screen_type);
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_STRING(">");
indent++;
/* general options */
if (READ_BOOL(*options, show_icon_names)) continue;
- if (READ_BOOL(*options, show_copy_path)) continue;
if (READ_BOOL(*options, tree_descend_subdirs)) continue;
if (READ_BOOL(*options, lazy_image_sync)) continue;
if (READ_INT(*options, image.tile_cache_max)) continue;
if (READ_INT(*options, image.image_cache_max)) continue;
if (READ_UINT_CLAMP(*options, image.zoom_quality, GDK_INTERP_NEAREST, GDK_INTERP_HYPER)) continue;
- if (READ_UINT_CLAMP(*options, image.dither_quality, GDK_RGB_DITHER_NONE, GDK_RGB_DITHER_MAX)) continue;
if (READ_INT(*options, image.zoom_increment)) continue;
if (READ_BOOL(*options, image.enable_read_ahead)) continue;
if (READ_BOOL(*options, image.exif_rotate_enable)) continue;
if (READ_BOOL(*options, image.use_custom_border_color)) continue;
+ if (READ_BOOL(*options, image.use_custom_border_color_in_fullscreen)) continue;
if (READ_COLOR(*options, image.border_color)) continue;
- if (READ_INT_CLAMP(*options, image.read_buffer_size, IMAGE_LOADER_READ_BUFFER_SIZE_MIN, IMAGE_LOADER_READ_BUFFER_SIZE_MAX)) continue;
- if (READ_INT_CLAMP(*options, image.idle_read_loop_count, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MIN, IMAGE_LOADER_IDLE_READ_LOOP_COUNT_MAX)) continue;
-
+ if (READ_BOOL(*options, image.use_clutter_renderer)) continue;
/* thumbnails options */
if (READ_INT_CLAMP(*options, thumbnails.max_width, 16, 512)) continue;
if (READ_BOOL(*options, thumbnails.enable_caching)) continue;
if (READ_BOOL(*options, thumbnails.cache_into_dirs)) continue;
- if (READ_BOOL(*options, thumbnails.fast)) continue;
if (READ_BOOL(*options, thumbnails.use_xvpics)) continue;
if (READ_BOOL(*options, thumbnails.spec_standard)) continue;
if (READ_UINT_CLAMP(*options, thumbnails.quality, GDK_INTERP_NEAREST, GDK_INTERP_HYPER)) continue;
if (READ_INT(*options, metadata.confirm_timeout)) continue;
if (READ_BOOL(*options, metadata.confirm_on_image_change)) continue;
if (READ_BOOL(*options, metadata.confirm_on_dir_change)) continue;
-
+ if (READ_BOOL(*options, metadata.keywords_case_sensitive)) continue;
+ if (READ_BOOL(*options, metadata.write_orientation)) continue;
+
+ if (READ_INT(*options, stereo.mode)) continue;
+ if (READ_INT(*options, stereo.fsmode)) continue;
+ if (READ_BOOL(*options, stereo.enable_fsmode)) continue;
+ if (READ_INT(*options, stereo.fixed_w)) continue;
+ if (READ_INT(*options, stereo.fixed_h)) continue;
+ if (READ_INT(*options, stereo.fixed_x1)) continue;
+ if (READ_INT(*options, stereo.fixed_y1)) continue;
+ if (READ_INT(*options, stereo.fixed_x2)) continue;
+ if (READ_INT(*options, stereo.fixed_y2)) continue;
+
+ /* dummy options */
+ if (READ_DUMMY(*options, image.dither_quality, "deprecated since 2012-08-13")) continue;
+
+ /* unknown options */
log_printf("unknown attribute %s = %s\n", option, value);
}
if (READ_BOOL(options->color_profile, enabled)) continue;
if (READ_BOOL(options->color_profile, use_image)) continue;
if (READ_INT(options->color_profile, input_type)) continue;
- if (READ_INT(options->color_profile, screen_type)) continue;
if (READ_CHAR(options->color_profile, screen_file)) continue;
+ if (READ_BOOL(options->color_profile, use_x11_screen_profile)) continue;
log_printf("unknown attribute %s = %s\n", option, value);
}
static void options_parse_global_end(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, gpointer data, GError **error)
{
- /* on startup there are no layout windows and this just loads the editors */
- layout_editors_reload_all();
+#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
}
static void options_parse_pane_exif(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
}
options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
}
+#ifdef HAVE_LIBCHAMPLAIN
+#ifdef HAVE_LIBCHAMPLAIN_GTK
+ else if (g_ascii_strcasecmp(element_name, "pane_gps") == 0)
+ {
+ GtkWidget *pane = bar_find_pane_by_id(bar, PANE_GPS, options_get_id(attribute_names, attribute_values));
+ if (pane)
+ {
+ bar_pane_gps_update_from_config(pane, attribute_names, attribute_values);
+ }
+ else
+ {
+ pane = bar_pane_gps_new_from_config(attribute_names, attribute_values);
+ bar_add(bar, pane);
+ }
+ options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+ }
+#endif
+#endif
else if (g_ascii_strcasecmp(element_name, "pane_exif") == 0)
{
GtkWidget *pane = bar_find_pane_by_id(bar, PANE_EXIF, options_get_id(attribute_names, attribute_values));
LayoutWindow *lw = data;
if (g_ascii_strcasecmp(element_name, "toolitem") == 0)
{
- layout_toolbar_add_from_config(lw, attribute_names, attribute_values);
+ layout_toolbar_add_from_config(lw, TOOLBAR_MAIN, attribute_names, attribute_values);
options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
}
else if (g_ascii_strcasecmp(element_name, "clear") == 0)
{
- layout_toolbar_clear(lw);
+ layout_toolbar_clear(lw, TOOLBAR_MAIN);
options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
}
else
}
}
+static void options_parse_statusbar(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+{
+ LayoutWindow *lw = data;
+ if (g_ascii_strcasecmp(element_name, "toolitem") == 0)
+ {
+ layout_toolbar_add_from_config(lw, TOOLBAR_STATUS, attribute_names, attribute_values);
+ options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+ }
+ else if (g_ascii_strcasecmp(element_name, "clear") == 0)
+ {
+ layout_toolbar_clear(lw, TOOLBAR_STATUS);
+ options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+ }
+ else
+ {
+ log_printf("unexpected in <statusbar>: <%s>\n", element_name);
+ options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+ }
+}
+
static void options_parse_layout(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
{
LayoutWindow *lw = data;
{
options_parse_func_push(parser_data, options_parse_toolbar, NULL, lw);
}
+ else if (g_ascii_strcasecmp(element_name, "statusbar") == 0)
+ {
+ options_parse_func_push(parser_data, options_parse_statusbar, NULL, lw);
+ }
else
{
log_printf("unexpected in <layout>: <%s>\n", element_name);
{
GQParserData *parser_data = user_data;
GQParserFuncData *func = parser_data->parse_func_stack->data;
- DEBUG_1("start %s", element_name);
+ DEBUG_2("start %s", element_name);
if (func->start_func)
func->start_func(parser_data, context, element_name, attribute_names, attribute_values, func->data, error);
{
GQParserData *parser_data = user_data;
GQParserFuncData *func = parser_data->parse_func_stack->data;
- DEBUG_1("end %s", element_name);
+ DEBUG_2("end %s", element_name);
if (func->end_func)
func->end_func(parser_data, context, element_name, func->data, error);