annotate src/globals.c @ 319:f9611a6cf0e2

Move file_sort_case_sensitive to ConfOptions.
author zas_
date Fri, 11 Apr 2008 22:27:54 +0000
parents b16b9b8979e5
children c74af1cbd61a
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
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
15 GList *filename_filter = NULL;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
16
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
17 ConfOptions *init_options(ConfOptions *options)
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
18 {
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
19 if (!options) options = g_new0(ConfOptions, 1);
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
20
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
21 options->main_window_w = 500;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
22 options->main_window_h = 400;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
23 options->main_window_x = 0;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
24 options->main_window_y = 0;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
25 options->main_window_maximized = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
26
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
27 options->float_window_w = 260;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
28 options->float_window_h = 450;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
29 options->float_window_x = 0;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
30 options->float_window_y = 0;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
31 options->float_window_divider = -1;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
32
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
33 options->window_hdivider_pos = -1;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
34 options->window_vdivider_pos = 200;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
35
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
36 options->save_window_positions = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
37 options->tools_float = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
38 options->tools_hidden = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
39 options->toolbar_hidden = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
40 options->progressive_key_scrolling = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
41
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
42 options->startup_path_enable = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
43 options->startup_path = NULL;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
44 options->confirm_delete = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
45 options->enable_delete_key = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
46 options->safe_delete_enable = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
47 options->safe_delete_path = NULL;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
48 options->safe_delete_size = 128;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
49 options->restore_tool = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
50 options->zoom_mode = ZOOM_RESET_ORIGINAL;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
51 options->two_pass_zoom = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
52 options->scroll_reset_method = SCROLL_RESET_TOPLEFT;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
53 options->fit_window = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
54 options->limit_window_size = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
55 options->zoom_to_fit_expands = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
56 options->max_window_size = 100;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
57 options->limit_autofit_size = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
58 options->max_autofit_size = 100;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
59 options->thumb_max_width = DEFAULT_THUMB_WIDTH;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
60 options->thumb_max_height = DEFAULT_THUMB_HEIGHT;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
61 options->enable_thumb_caching = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
62 options->enable_thumb_dirs = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
63 options->use_xvpics_thumbnails = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
64 options->thumbnail_fast = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
65 options->thumbnail_spec_standard = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
66 options->enable_metadata_dirs = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
67 options->show_dot_files = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
68 options->file_filter_disable = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
69
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
70
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
71 options->thumbnails_enabled = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
72 options->file_sort_method = SORT_NAME;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
73 options->file_sort_ascending = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
74
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
75 options->slideshow_delay = 150;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
76 options->slideshow_random = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
77 options->slideshow_repeat = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
78
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
79 options->mousewheel_scrolls = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
80 options->enable_in_place_rename = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
81
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
82 options->recent_list_max = 10;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
83
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
84 options->collection_rectangular_selection = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
85
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
86 options->tile_cache_max = 10;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
87 options->thumbnail_quality = (gint)GDK_INTERP_TILES;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
88 options->zoom_quality = (gint)GDK_INTERP_BILINEAR;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
89 options->dither_quality = (gint)GDK_RGB_DITHER_NORMAL;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
90
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
91 options->zoom_increment = 5;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
92
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
93 options->enable_read_ahead = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
94
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
95 options->place_dialogs_under_mouse = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
96
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
97 options->user_specified_window_background = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
98 memset(&options->window_background_color, 0, sizeof(options->window_background_color));
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
99
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
100 options->fullscreen_screen = -1;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
101 options->fullscreen_clean_flip = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
102 options->fullscreen_disable_saver = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
103 options->fullscreen_above = FALSE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
104 options->show_fullscreen_info = TRUE;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
105 options->fullscreen_info = NULL;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
106
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
107 options->dupe_custom_threshold = 99;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
108
319
f9611a6cf0e2 Move file_sort_case_sensitive to ConfOptions.
zas_
parents: 318
diff changeset
109 options->file_sort_case_sensitive = FALSE;
f9611a6cf0e2 Move file_sort_case_sensitive to ConfOptions.
zas_
parents: 318
diff changeset
110
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
111 return options;
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
112 }
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
113
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
114 /* -- options -- */
227
41fc4bfc8b25 Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents: 226
diff changeset
115 #ifdef DEBUG
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
116 gint debug = FALSE;
227
41fc4bfc8b25 Add a debug level spinner at the end of Preferences > Advanced.
zas_
parents: 226
diff changeset
117 #endif
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
118
318
b16b9b8979e5 Add a new struct ConfOptions to handle options.
zas_
parents: 285
diff changeset
119
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
120 /* layout */
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
121 gchar *layout_order = NULL;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
122 gint layout_style = 0;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
123
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
124 gint layout_view_icons = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
125 gint layout_view_tree = FALSE;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
126
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
127 gint show_icon_names = TRUE;
1
b3e0e515fabf Initial revision
gqview
parents:
diff changeset
128
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
129 gint tree_descend_subdirs = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
130
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
131 gint lazy_image_sync = FALSE;
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
132 gint update_on_time_change = TRUE;
285
6917ea10738c Enable image rotation depending on EXIF by default.
zas_
parents: 283
diff changeset
133 gint exif_rotate_enable = TRUE;
9
d907d608745f Sync to GQview 1.5.9 release.
gqview
parents: 4
diff changeset
134
113
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
135 /* color profiles */
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
136 gint color_profile_enabled = FALSE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
137 gint color_profile_input_type = 0;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
138 gchar *color_profile_input_file[COLOR_PROFILE_INPUTS];
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
139 gchar *color_profile_input_name[COLOR_PROFILE_INPUTS];
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
140 gint color_profile_screen_type = 0;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
141 gchar *color_profile_screen_file = NULL;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
142 gint color_profile_use_image = TRUE;
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
143
55166d93498d Fri Nov 24 21:37:01 2006 John Ellis <johne@verizon.net>
gqview
parents: 14
diff changeset
144