Preparing stable version
[geeqie.git] / src / rcfile.c
index e6663f9..7328f32 100644 (file)
@@ -44,7 +44,7 @@
 #include "metadata.h"
 #include "bar_gps.h"
 #include "dupe.h"
-
+#include "ui_utildlg.h"
 
 /*
  *-----------------------------------------------------------------------------
@@ -322,17 +322,25 @@ static void write_global_attributes(GString *outstr, gint indent)
        WRITE_NL(); WRITE_UINT(*options, duplicates_select_type);
        WRITE_NL(); WRITE_BOOL(*options, duplicates_thumbnails);
        WRITE_NL(); WRITE_BOOL(*options, rot_invariant_sim);
+       WRITE_NL(); WRITE_BOOL(*options, sort_totals);
        WRITE_SEPARATOR();
 
        WRITE_NL(); WRITE_BOOL(*options, mousewheel_scrolls);
        WRITE_NL(); WRITE_BOOL(*options, image_lm_click_nav);
+       WRITE_NL(); WRITE_BOOL(*options, image_l_click_video);
+       WRITE_NL(); WRITE_CHAR(*options, image_l_click_video_editor);
        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_INT(*options, clipboard_selection);
 
        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);
+       WRITE_NL(); WRITE_BOOL(*options, save_dialog_window_positions);
+
+       WRITE_NL(); WRITE_UINT(*options, log_window_lines);
+       WRITE_NL(); WRITE_BOOL(*options, log_window.timer_data);
 
        /* File operations Options */
        WRITE_NL(); WRITE_BOOL(*options, file_ops.enable_in_place_rename);
@@ -380,6 +388,8 @@ static void write_global_attributes(GString *outstr, gint indent)
        WRITE_NL(); WRITE_BOOL(*options, thumbnails.spec_standard);
        WRITE_NL(); WRITE_UINT(*options, thumbnails.quality);
        WRITE_NL(); WRITE_BOOL(*options, thumbnails.use_exif);
+       WRITE_NL(); WRITE_BOOL(*options, thumbnails.use_ft_metadata);
+//     WRITE_NL(); WRITE_BOOL(*options, thumbnails.use_ft_metadata_small);
 
        /* File sorting Options */
        WRITE_NL(); WRITE_INT(*options, file_sort.method);
@@ -462,6 +472,12 @@ static void write_global_attributes(GString *outstr, gint indent)
        WRITE_NL(); WRITE_INT(*options, stereo.fixed_y1);
        WRITE_NL(); WRITE_INT(*options, stereo.fixed_x2);
        WRITE_NL(); WRITE_INT(*options, stereo.fixed_y2);
+
+       /* copy move rename */
+       WRITE_NL(); WRITE_INT(*options, cp_mv_rn.auto_start);
+       WRITE_NL(); WRITE_INT(*options, cp_mv_rn.auto_padding);
+       WRITE_NL(); WRITE_CHAR(*options, cp_mv_rn.auto_end);
+       WRITE_NL(); WRITE_INT(*options, cp_mv_rn.formatted_start);
 }
 
 static void write_color_profile(GString *outstr, gint indent)
@@ -606,20 +622,28 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
                if (READ_UINT_CLAMP(*options, duplicates_select_type, 0, DUPE_SELECT_GROUP2)) continue;
                if (READ_BOOL(*options, duplicates_thumbnails)) continue;
                if (READ_BOOL(*options, rot_invariant_sim)) continue;
+               if (READ_BOOL(*options, sort_totals)) continue;
 
                if (READ_BOOL(*options, progressive_key_scrolling)) continue;
                if (READ_UINT_CLAMP(*options, keyboard_scroll_step, 1, 32)) continue;
 
                if (READ_BOOL(*options, mousewheel_scrolls)) continue;
                if (READ_BOOL(*options, image_lm_click_nav)) continue;
+               if (READ_BOOL(*options, image_l_click_video)) continue;
+               if (READ_CHAR(*options, image_l_click_video_editor)) continue;
 
                if (READ_INT(*options, open_recent_list_maxsize)) continue;
                if (READ_INT(*options, dnd_icon_size)) continue;
                if (READ_BOOL(*options, place_dialogs_under_mouse)) continue;
+               if (READ_INT(*options, clipboard_selection)) continue;
 
                if (READ_BOOL(*options, save_window_positions)) continue;
                if (READ_BOOL(*options, use_saved_window_positions_for_new_windows)) continue;
                if (READ_BOOL(*options, tools_restore_state)) continue;
+               if (READ_BOOL(*options, save_dialog_window_positions)) continue;
+
+               if (READ_INT(*options, log_window_lines)) continue;
+               if (READ_BOOL(*options, log_window.timer_data)) continue;
 
                /* Properties dialog options */
                if (READ_CHAR(*options, properties.tabs_order)) continue;
@@ -658,6 +682,8 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
                if (READ_BOOL(*options, thumbnails.spec_standard)) continue;
                if (READ_UINT_CLAMP(*options, thumbnails.quality, GDK_INTERP_NEAREST, GDK_INTERP_HYPER)) continue;
                if (READ_BOOL(*options, thumbnails.use_exif)) continue;
+               if (READ_BOOL(*options, thumbnails.use_ft_metadata)) continue;
+//             if (READ_BOOL(*options, thumbnails.use_ft_metadata_small)) continue;
 
                /* File sorting options */
                if (READ_UINT(*options, file_sort.method)) continue;
@@ -745,6 +771,12 @@ static gboolean load_global_params(const gchar **attribute_names, const gchar **
                if (READ_INT(*options, stereo.fixed_x2)) continue;
                if (READ_INT(*options, stereo.fixed_y2)) continue;
 
+               /* copy move rename */
+               if (READ_INT(*options, cp_mv_rn.auto_start))  continue;
+               if (READ_INT(*options, cp_mv_rn.auto_padding)) continue;
+               if (READ_CHAR(*options, cp_mv_rn.auto_end)) continue;
+               if (READ_INT(*options, cp_mv_rn.formatted_start)) continue;
+
                /* Dummy options */
                if (READ_DUMMY(*options, image.dither_quality, "deprecated since 2012-08-13")) continue;
 
@@ -948,6 +980,22 @@ static void options_parse_pane_exif(GQParserData *parser_data, GMarkupParseConte
                }
 }
 
+static void options_parse_pane_keywords(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+{
+       GtkWidget *pane = data;
+
+       if (g_ascii_strcasecmp(element_name, "expanded") == 0)
+               {
+               bar_pane_keywords_entry_add_from_config(pane, attribute_names, attribute_values);
+               options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+               }
+       else
+               {
+               log_printf("unexpected in <pane_keywords>: <%s>\n", element_name);
+               options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+               }
+}
+
 static void options_parse_bar(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
 {
        GtkWidget *bar = data;
@@ -1023,7 +1071,7 @@ static void options_parse_bar(GQParserData *parser_data, GMarkupParseContext *co
                        pane = bar_pane_keywords_new_from_config(attribute_names, attribute_values);
                        bar_add(bar, pane);
                        }
-               options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+               options_parse_func_push(parser_data, options_parse_pane_keywords, NULL, pane);
                }
        else if (g_ascii_strcasecmp(element_name, "clear") == 0)
                {
@@ -1037,13 +1085,37 @@ static void options_parse_bar(GQParserData *parser_data, GMarkupParseContext *co
                }
 }
 
-/* Just a dummy function to parse out old leftovers
- *
- * This function can be cleaned somedays.
- */
-static void options_parse_toolbar_and_statusbar(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+static void options_parse_toolbar(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);
+       LayoutWindow *lw = data;
+       if (g_ascii_strcasecmp(element_name, "toolitem") == 0)
+               {
+               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, TOOLBAR_MAIN);
+               options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+               }
+       else
+               {
+               log_printf("unexpected in <toolbar>: <%s>\n", element_name);
+               options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+               }
+}
+static void options_parse_dialogs(GQParserData *parser_data, GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer data, GError **error)
+{
+       if (g_ascii_strcasecmp(element_name, "window") == 0)
+               {
+               generic_dialog_windows_load_config(attribute_names, attribute_values);
+               options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+               }
+       else
+               {
+               log_printf("unexpected in <dialogs>: <%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)
@@ -1065,17 +1137,20 @@ static void options_parse_layout(GQParserData *parser_data, GMarkupParseContext
                }
        else if (g_ascii_strcasecmp(element_name, "bar_sort") == 0)
                {
-               GtkWidget *bar = bar_sort_new_from_config(lw, attribute_names, attribute_values);
-               layout_bar_sort_set(lw, bar);
+               bar_sort_cold_start(lw, attribute_names, attribute_values);
                options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
                }
        else if (g_ascii_strcasecmp(element_name, "toolbar") == 0)
                {
-               options_parse_func_push(parser_data, options_parse_toolbar_and_statusbar, NULL, NULL);
+               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_toolbar_and_statusbar, NULL, NULL);
+               options_parse_func_push(parser_data, options_parse_leaf, NULL, NULL);
+               }
+       else if (g_ascii_strcasecmp(element_name, "dialogs") == 0)
+               {
+               options_parse_func_push(parser_data, options_parse_dialogs, NULL, NULL);
                }
        else
                {