Remove commented out code.
[geeqie.git] / src / options.c
index 33030f3..de09246 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Geeqie
- * Copyright (C) 2008 - 2009 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
  *
  * Authors: Vladimir Nadvornik, Laurent Monin
  *
@@ -33,8 +33,8 @@ ConfOptions *init_options(ConfOptions *options)
        options->color_profile.enabled = TRUE;
        options->color_profile.input_type = 0;
        options->color_profile.screen_file = NULL;
-       options->color_profile.screen_type = 0;
        options->color_profile.use_image = TRUE;
+       options->color_profile.use_x11_screen_profile = TRUE;
 
        options->dnd_icon_size = 48;
        options->duplicates_similarity_threshold = 99;
@@ -63,20 +63,19 @@ ConfOptions *init_options(ConfOptions *options)
        options->fullscreen.screen = -1;
 
        memset(&options->image.border_color, 0, sizeof(options->image.border_color));
-       options->image.dither_quality = GDK_RGB_DITHER_NORMAL;
        options->image.enable_read_ahead = TRUE;
        options->image.exif_rotate_enable = TRUE;
+       options->image.exif_proof_rotate_enable = TRUE;
        options->image.fit_window_to_image = FALSE;
-       options->image.idle_read_loop_count = IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT;
        options->image.limit_autofit_size = FALSE;
        options->image.limit_window_size = TRUE;
        options->image.max_autofit_size = 100;
        options->image.max_window_size = 90;
-       options->image.read_buffer_size = IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT;
        options->image.scroll_reset_method = SCROLL_RESET_NOCHANGE;
        options->image.tile_cache_max = 10;
        options->image.image_cache_max = 128; /* 4 x 10MPix */
        options->image.use_custom_border_color = FALSE;
+       options->image.use_custom_border_color_in_fullscreen = TRUE;
        options->image.zoom_2pass = TRUE;
        options->image.zoom_increment = 5;
        options->image.zoom_mode = ZOOM_RESET_NONE;
@@ -105,21 +104,17 @@ ConfOptions *init_options(ConfOptions *options)
        options->metadata.confirm_timeout = 10;
        options->metadata.confirm_on_image_change = FALSE;
        options->metadata.confirm_on_dir_change = TRUE;
+       options->metadata.keywords_case_sensitive = FALSE;
+       options->metadata.write_orientation = TRUE;
        
-       options->show_copy_path = TRUE;
        options->show_icon_names = TRUE;
 
        options->slideshow.delay = 50;
        options->slideshow.random = FALSE;
        options->slideshow.repeat = FALSE;
 
-       options->startup.path = NULL;
-       options->startup.restore_path = FALSE;
-       options->startup.use_last_path = FALSE;
-
        options->thumbnails.cache_into_dirs = FALSE;
        options->thumbnails.enable_caching = TRUE;
-       options->thumbnails.fast = TRUE;
        options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT;
        options->thumbnails.max_width = DEFAULT_THUMB_WIDTH;
        options->thumbnails.quality = GDK_INTERP_TILES;
@@ -129,6 +124,13 @@ ConfOptions *init_options(ConfOptions *options)
 
        options->tree_descend_subdirs = FALSE;
        options->update_on_time_change = TRUE;
+       
+       options->stereo.fixed_w = 1920;
+       options->stereo.fixed_h = 1080;
+       options->stereo.fixed_x1 = 0;
+       options->stereo.fixed_y1 = 0;
+       options->stereo.fixed_x2 = 0;
+       options->stereo.fixed_y2 = 1125;
 
        return options;
 }
@@ -154,15 +156,10 @@ void setup_default_options(ConfOptions *options)
                }
 
        set_default_image_overlay_template_string(&options->image_overlay.template_string);
-       options->sidecar.ext = g_strdup(".jpg;%raw;.xmp");
+       options->sidecar.ext = g_strdup(".jpg;%raw;.ufraw;.xmp;%unknown");
 
        options->shell.path = g_strdup(GQ_DEFAULT_SHELL_PATH);
        options->shell.options = g_strdup(GQ_DEFAULT_SHELL_OPTIONS);
-
-#if 0  
-       for (i = 0; ExifUIList[i].key; i++)
-               ExifUIList[i].current = ExifUIList[i].default_value;
-#endif
 }
 
 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src)
@@ -173,6 +170,7 @@ void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src)
        dest->id = g_strdup(src->id);
        dest->order = g_strdup(src->order);
        dest->home_path = g_strdup(src->home_path);
+       dest->last_path = g_strdup(src->last_path);
 }
 
 void free_layout_options_content(LayoutOptions *dest)
@@ -180,6 +178,7 @@ void free_layout_options_content(LayoutOptions *dest)
        g_free(dest->id);
        g_free(dest->order);
        g_free(dest->home_path);
+       g_free(dest->last_path);
 }
 
 LayoutOptions *init_layout_options(LayoutOptions *options)
@@ -206,7 +205,7 @@ LayoutOptions *init_layout_options(LayoutOptions *options)
        options->show_marks = FALSE;
        options->show_thumbnails = FALSE;
        options->style = 0;
-       options->info_pixel_hidden = TRUE;
+       options->show_info_pixel = FALSE;
        options->toolbar_hidden = FALSE;
        options->tools_float = FALSE;
        options->tools_hidden = FALSE;
@@ -228,14 +227,7 @@ static void sync_options_with_current_state(ConfOptions *options)
                options->color_profile.enabled = layout_image_color_profile_get_use(lw);
                layout_image_color_profile_get(lw,
                                               &options->color_profile.input_type,
-                                              &options->color_profile.screen_type,
                                               &options->color_profile.use_image);
-
-               if (options->startup.restore_path && options->startup.use_last_path)
-                       {
-                       g_free(options->startup.path);
-                       options->startup.path = g_strdup(layout_get_path(lw));
-                       }
                }
 
 }
@@ -247,7 +239,7 @@ void save_options(ConfOptions *options)
        sync_options_with_current_state(options);
 
        rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL);
-       save_options_to(rc_path, options);
+       save_config_to_file(rc_path, options);
        g_free(rc_path);
 }
 
@@ -259,13 +251,13 @@ gboolean load_options(ConfOptions *options)
        if (isdir(GQ_SYSTEM_WIDE_DIR))
                {
                rc_path = g_build_filename(GQ_SYSTEM_WIDE_DIR, RC_FILE_NAME, NULL);
-               success = load_options_from(rc_path, options, TRUE);
+               success = load_config_from_file(rc_path, TRUE);
                DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed");
                g_free(rc_path);
                }
        
        rc_path = g_build_filename(get_rc_dir(), RC_FILE_NAME, NULL);
-       success = load_options_from(rc_path, options, TRUE);
+       success = load_config_from_file(rc_path, TRUE);
        DEBUG_1("Loading options from %s ... %s", rc_path, success ? "done" : "failed");
        g_free(rc_path);
        return(success);