annotate src/options.c @ 619:2ccc7d856d55

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