comparison src/options.c @ 508:011a6be611c8

Move options stuff to options.{c,h} and remove globals.c
author zas_
date Thu, 24 Apr 2008 09:09:48 +0000
parents
children fe675761d091
comparison
equal deleted inserted replaced
507:135570a8bd96 508:011a6be611c8
1 /*
2 * Geeqie
3 * Copyright (C) 2008 The Geeqie Team
4 *
5 * Authors: Vladimir Nadvornik, Laurent Monin
6 *
7 * This software is released under the GNU General Public License (GNU GPL).
8 * Please read the included file COPYING for more information.
9 * This software comes with no warranty of any kind, use at your own risk!
10 */
11
12 #include "main.h"
13 #include "options.h"
14
15 ConfOptions *init_options(ConfOptions *options)
16 {
17 if (!options) options = g_new0(ConfOptions, 1);
18
19 options->collections.rectangular_selection = FALSE;
20
21 options->color_profile.enabled = FALSE;
22 options->color_profile.input_type = 0;
23 options->color_profile.screen_file = NULL;
24 options->color_profile.screen_type = 0;
25 options->color_profile.use_image = TRUE;
26
27 options->dnd_icon_size = 48;
28 options->duplicates_similarity_threshold = 99;
29 options->enable_metadata_dirs = FALSE;
30
31 options->file_filter.disable = FALSE;
32 options->file_filter.show_dot_directory = FALSE;
33 options->file_filter.show_hidden_files = FALSE;
34
35 options->file_ops.confirm_delete = TRUE;
36 options->file_ops.enable_delete_key = TRUE;
37 options->file_ops.enable_in_place_rename = TRUE;
38 options->file_ops.safe_delete_enable = FALSE;
39 options->file_ops.safe_delete_folder_maxsize = 128;
40 options->file_ops.safe_delete_path = NULL;
41
42 options->file_sort.ascending = TRUE;
43 options->file_sort.case_sensitive = FALSE;
44 options->file_sort.method = SORT_NAME;
45
46 options->fullscreen.above = FALSE;
47 options->fullscreen.clean_flip = FALSE;
48 options->fullscreen.disable_saver = TRUE;
49 options->fullscreen.screen = -1;
50
51 memset(&options->image.border_color, 0, sizeof(options->image.border_color));
52 options->image.dither_quality = (gint)GDK_RGB_DITHER_NORMAL;
53 options->image.enable_read_ahead = TRUE;
54 options->image.exif_rotate_enable = TRUE;
55 options->image.fit_window_to_image = FALSE;
56 options->image.idle_read_loop_count = IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT;
57 options->image.limit_autofit_size = FALSE;
58 options->image.limit_window_size = FALSE;
59 options->image.max_autofit_size = 100;
60 options->image.max_window_size = 100;
61 options->image.read_buffer_size = IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT;
62 options->image.scroll_reset_method = SCROLL_RESET_TOPLEFT;
63 options->image.tile_cache_max = 10;
64 options->image.use_custom_border_color = FALSE;
65 options->image.zoom_2pass = TRUE;
66 options->image.zoom_increment = 5;
67 options->image.zoom_mode = ZOOM_RESET_ORIGINAL;
68 options->image.zoom_quality = (gint)GDK_INTERP_BILINEAR;
69 options->image.zoom_to_fit_allow_expand = TRUE;
70
71 options->image_overlay.common.enabled = FALSE;
72 options->image_overlay.common.show_at_startup = FALSE;
73 options->image_overlay.common.template_string = NULL;
74
75 options->layout.dir_view_type = DIRVIEW_LIST;
76 options->layout.float_window.h = 450;
77 options->layout.float_window.vdivider_pos = -1;
78 options->layout.float_window.w = 260;
79 options->layout.float_window.x = 0;
80 options->layout.float_window.y = 0;
81 options->layout.main_window.h = 400;
82 options->layout.main_window.hdivider_pos = -1;
83 options->layout.main_window.maximized = FALSE;
84 options->layout.main_window.vdivider_pos = 200;
85 options->layout.main_window.w = 500;
86 options->layout.main_window.x = 0;
87 options->layout.main_window.y = 0;
88 options->layout.order = NULL;
89 options->layout.save_window_positions = FALSE;
90 options->layout.show_marks = FALSE;
91 options->layout.show_thumbnails = FALSE;
92 options->layout.style = 0;
93 options->layout.toolbar_hidden = FALSE;
94 options->layout.tools_float = FALSE;
95 options->layout.tools_hidden = FALSE;
96 options->layout.tools_restore_state = FALSE;
97 options->layout.view_as_icons = FALSE;
98
99 options->lazy_image_sync = FALSE;
100 options->mousewheel_scrolls = FALSE;
101 options->open_recent_list_maxsize = 10;
102 options->place_dialogs_under_mouse = FALSE;
103
104 options->panels.exif.enabled = FALSE;
105 options->panels.exif.width = PANEL_DEFAULT_WIDTH;
106 options->panels.info.enabled = FALSE;
107 options->panels.info.width = PANEL_DEFAULT_WIDTH;
108 options->panels.sort.action_state = 0;
109 options->panels.sort.enabled = FALSE;
110 options->panels.sort.mode_state = 0;
111 options->panels.sort.selection_state = 0;
112
113 options->progressive_key_scrolling = FALSE;
114 options->show_copy_path = FALSE;
115 options->show_icon_names = TRUE;
116
117 options->slideshow.delay = 150;
118 options->slideshow.random = FALSE;
119 options->slideshow.repeat = FALSE;
120
121 options->startup_path_enable = FALSE;
122 options->startup_path = NULL;
123
124 options->thumbnails.cache_into_dirs = FALSE;
125 options->thumbnails.enable_caching = TRUE;
126 options->thumbnails.fast = TRUE;
127 options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT;
128 options->thumbnails.max_width = DEFAULT_THUMB_WIDTH;
129 options->thumbnails.quality = (gint)GDK_INTERP_TILES;
130 options->thumbnails.spec_standard = TRUE;
131 options->thumbnails.use_xvpics = TRUE;
132
133 options->tree_descend_subdirs = FALSE;
134 options->update_on_time_change = TRUE;
135
136 return options;
137 }