annotate src/globals.c @ 414:49c1cbe058ae

partially fixed reading embedded color profiles with exiv2
author nadvornik
date Fri, 18 Apr 2008 22:31:58 +0000
parents 9e521adbf312
children d7272434b8c2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
1 /*
196
f6e307c7bad6 rename GQview -> Geeqie over the code
nadvornik
parents: 113
diff changeset
2 * Geeqie
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
3 * (C) 2004 John Ellis
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
4 *
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
5 * Author: John Ellis
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
6 *
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
7 * This software is released under the GNU General Public License (GNU GPL).
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
8 * Please read the included file COPYING for more information.
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
9 * This software comes with no warranty of any kind, use at your own risk!
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
10 */
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
11
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
12
281
9995c5fb202a gqview.h -> main.h
zas_
parents: 227
diff changeset
13 #include "main.h"
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
14
320
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
15 #ifdef DEBUG
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
16 gint debug = FALSE;
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
17 #endif
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
18
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
19
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
20 ConfOptions *init_options(ConfOptions *options)
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
21 {
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
22 if (!options) options = g_new0(ConfOptions, 1);
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
23
338
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
24 options->layout.main_window.w = 500;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
25 options->layout.main_window.h = 400;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
26 options->layout.main_window.x = 0;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
27 options->layout.main_window.y = 0;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
28 options->layout.main_window.maximized = FALSE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
29
338
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
30 options->layout.float_window.w = 260;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
31 options->layout.float_window.h = 450;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
32 options->layout.float_window.x = 0;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
33 options->layout.float_window.y = 0;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
34 options->layout.float_window.vdivider_pos = -1;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
35
338
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
36 options->layout.main_window.hdivider_pos = -1;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
37 options->layout.main_window.vdivider_pos = 200;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
38
338
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
39 options->layout.save_window_positions = FALSE;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
40 options->layout.tools_float = FALSE;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
41 options->layout.tools_hidden = FALSE;
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
42 options->layout.toolbar_hidden = FALSE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
43 options->progressive_key_scrolling = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
44
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
45 options->startup_path_enable = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
46 options->startup_path = NULL;
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 340
diff changeset
47 options->file_ops.confirm_delete = TRUE;
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 340
diff changeset
48 options->file_ops.enable_delete_key = TRUE;
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 340
diff changeset
49 options->file_ops.safe_delete_enable = FALSE;
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 340
diff changeset
50 options->file_ops.safe_delete_path = NULL;
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 340
diff changeset
51 options->file_ops.safe_delete_folder_maxsize = 128;
338
41c3cb73120f Rename window options (moved to layout) and re-order rc file.
zas_
parents: 334
diff changeset
52 options->layout.tools_restore_state = FALSE;
413
9e521adbf312 Add two new options to control image read buffer at runtime.
zas_
parents: 380
diff changeset
53
334
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
54 options->image.zoom_mode = ZOOM_RESET_ORIGINAL;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
55 options->image.zoom_2pass = TRUE;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
56 options->image.scroll_reset_method = SCROLL_RESET_TOPLEFT;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
57 options->image.fit_window_to_image = FALSE;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
58 options->image.limit_window_size = FALSE;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
59 options->image.zoom_to_fit_allow_expand = TRUE;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
60 options->image.max_window_size = 100;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
61 options->image.limit_autofit_size = FALSE;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
62 options->image.max_autofit_size = 100;
413
9e521adbf312 Add two new options to control image read buffer at runtime.
zas_
parents: 380
diff changeset
63
9e521adbf312 Add two new options to control image read buffer at runtime.
zas_
parents: 380
diff changeset
64 options->image.read_buffer_size = IMAGE_LOADER_READ_BUFFER_SIZE_DEFAULT;
9e521adbf312 Add two new options to control image read buffer at runtime.
zas_
parents: 380
diff changeset
65 options->image.idle_read_loop_count = IMAGE_LOADER_IDLE_READ_LOOP_COUNT_DEFAULT;
9e521adbf312 Add two new options to control image read buffer at runtime.
zas_
parents: 380
diff changeset
66
333
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
67 options->thumbnails.max_width = DEFAULT_THUMB_WIDTH;
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
68 options->thumbnails.max_height = DEFAULT_THUMB_HEIGHT;
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
69 options->thumbnails.enable_caching = TRUE;
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
70 options->thumbnails.cache_into_dirs = FALSE;
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
71 options->thumbnails.use_xvpics = TRUE;
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
72 options->thumbnails.fast = TRUE;
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
73 options->thumbnails.spec_standard = TRUE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
74 options->enable_metadata_dirs = FALSE;
373
61a3c8b05b24 Add a new option in Preferences > Filtering to allow the
zas_
parents: 356
diff changeset
75
356
673d1eb5af73 Rename show_dot_files to show_hidden_files.
zas_
parents: 343
diff changeset
76 options->file_filter.show_hidden_files = FALSE;
373
61a3c8b05b24 Add a new option in Preferences > Filtering to allow the
zas_
parents: 356
diff changeset
77 options->file_filter.show_dot_directory = FALSE;
332
3c4bad726e98 Rename file filtering options.
zas_
parents: 331
diff changeset
78 options->file_filter.disable = FALSE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
79
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
80
340
77103f3f2cb1 Rename option thumbnails.enabled to layout.show_thumbnails as it makes
zas_
parents: 339
diff changeset
81 options->layout.show_thumbnails = FALSE;
329
a51242c032ea Rename file sorting options.
zas_
parents: 327
diff changeset
82 options->file_sort.method = SORT_NAME;
a51242c032ea Rename file sorting options.
zas_
parents: 327
diff changeset
83 options->file_sort.ascending = TRUE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
84
326
509b84801d66 Rename slideshow options.
zas_
parents: 322
diff changeset
85 options->slideshow.delay = 150;
509b84801d66 Rename slideshow options.
zas_
parents: 322
diff changeset
86 options->slideshow.random = FALSE;
509b84801d66 Rename slideshow options.
zas_
parents: 322
diff changeset
87 options->slideshow.repeat = FALSE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
88
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
89 options->mousewheel_scrolls = FALSE;
341
15c6b94545a2 Move safe_delete* and in place rename options to file_ops
zas_
parents: 340
diff changeset
90 options->file_ops.enable_in_place_rename = TRUE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
91
343
63380ea3e65d Rename recent_list_max/open_recent_max to open_recent_list_maxsize.
zas_
parents: 342
diff changeset
92 options->open_recent_list_maxsize = 10;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
93
330
57a4ced53618 Rename collection options.
zas_
parents: 329
diff changeset
94 options->collections.rectangular_selection = FALSE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
95
334
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
96 options->image.tile_cache_max = 10;
333
767b53cd9ab7 Rename thumbnails related options.
zas_
parents: 332
diff changeset
97 options->thumbnails.quality = (gint)GDK_INTERP_TILES;
334
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
98 options->image.zoom_quality = (gint)GDK_INTERP_BILINEAR;
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
99 options->image.dither_quality = (gint)GDK_RGB_DITHER_NORMAL;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
100
334
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
101 options->image.zoom_increment = 5;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
102
334
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
103 options->image.enable_read_ahead = TRUE;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
104
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
105 options->place_dialogs_under_mouse = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
106
339
de1c2cd06fce Rename user_specified_window_background and window_background_color
zas_
parents: 338
diff changeset
107 options->image.use_custom_border_color = FALSE;
de1c2cd06fce Rename user_specified_window_background and window_background_color
zas_
parents: 338
diff changeset
108 memset(&options->image.border_color, 0, sizeof(options->image.border_color));
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
109
322
d344bcf37618 Rationalize fullscreen options naming.
zas_
parents: 320
diff changeset
110 options->fullscreen.screen = -1;
d344bcf37618 Rationalize fullscreen options naming.
zas_
parents: 320
diff changeset
111 options->fullscreen.clean_flip = FALSE;
d344bcf37618 Rationalize fullscreen options naming.
zas_
parents: 320
diff changeset
112 options->fullscreen.disable_saver = TRUE;
d344bcf37618 Rationalize fullscreen options naming.
zas_
parents: 320
diff changeset
113 options->fullscreen.above = FALSE;
d344bcf37618 Rationalize fullscreen options naming.
zas_
parents: 320
diff changeset
114 options->fullscreen.show_info = TRUE;
d344bcf37618 Rationalize fullscreen options naming.
zas_
parents: 320
diff changeset
115 options->fullscreen.info = NULL;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
116
342
07490120df2d Rename dupe_custom_threshold option to duplicates_similarity_threshold.
zas_
parents: 341
diff changeset
117 options->duplicates_similarity_threshold = 99;
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
118
329
a51242c032ea Rename file sorting options.
zas_
parents: 327
diff changeset
119 options->file_sort.case_sensitive = FALSE;
319
f9611a6cf0e2 Move file_sort_case_sensitive to ConfOptions.
zas_
parents: 318
diff changeset
120
320
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
121 /* layout */
327
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
122 options->layout.order = NULL;
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
123 options->layout.style = 0;
320
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
124
327
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
125 options->layout.view_as_icons = FALSE;
380
5afe77bb563a Introduce a new struct ViewDir to handle directory views common
zas_
parents: 373
diff changeset
126 options->layout.dir_view_type = DIRVIEW_LIST;
320
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
127
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
128 options->show_icon_names = TRUE;
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
129
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
130 options->tree_descend_subdirs = FALSE;
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
131
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
132 options->lazy_image_sync = FALSE;
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
133 options->update_on_time_change = TRUE;
334
df868b947aa0 Rename image-related options.
zas_
parents: 333
diff changeset
134 options->image.exif_rotate_enable = TRUE;
320
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
135
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
136 /* color profiles */
327
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
137 options->color_profile.enabled = FALSE;
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
138 options->color_profile.input_type = 0;
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
139 options->color_profile.screen_type = 0;
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
140 options->color_profile.screen_file = NULL;
049d6b00cc14 Rename color profile options.
zas_
parents: 326
diff changeset
141 options->color_profile.use_image = TRUE;
320
c74af1cbd61a Move more options to ConfOptions.
zas_
parents: 319
diff changeset
142
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
143 return options;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
144 }