Fix #597: Help file search
[geeqie.git] / src / options.h
1 /*
2  * Copyright (C) 2008 - 2016 The Geeqie Team
3  *
4  * Authors: Vladimir Nadvornik, Laurent Monin
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20
21 #ifndef OPTIONS_H
22 #define OPTIONS_H
23
24 typedef struct _ConfOptions ConfOptions;
25
26 struct _ConfOptions
27 {
28         /* ui */
29         gboolean progressive_key_scrolling;
30         guint keyboard_scroll_step;
31         gboolean place_dialogs_under_mouse;
32         gboolean mousewheel_scrolls;
33         gboolean image_lm_click_nav;
34         gboolean image_l_click_video;
35         gchar *image_l_click_video_editor;
36         gboolean show_icon_names;
37
38         /* various */
39         gboolean tree_descend_subdirs;
40         gboolean view_dir_list_single_click_enter;
41
42         gboolean lazy_image_sync;
43         gboolean update_on_time_change;
44
45         guint duplicates_similarity_threshold;
46         guint duplicates_match;
47         gboolean duplicates_thumbnails;
48         guint duplicates_select_type;
49         gboolean rot_invariant_sim;
50         gboolean sort_totals;
51
52         gint open_recent_list_maxsize;
53         gint dnd_icon_size;
54         gint clipboard_selection;
55
56         gboolean save_window_positions;
57         gboolean use_saved_window_positions_for_new_windows;
58         gboolean tools_restore_state;
59         gboolean save_dialog_window_positions;
60         gboolean show_window_ids;
61
62         gint log_window_lines;
63
64         gboolean marks_save;            // save marks on exit
65         gchar *marks_tooltips[FILEDATA_MARKS_SIZE];
66
67         gchar *help_search_engine;
68
69         /* info sidebar component heights */
70         struct {
71                 gint height;
72         } info_comment;
73
74         struct {
75                 gint height;
76         } info_keywords;
77
78         struct {
79                 gint height;
80         } info_title;
81
82         struct {
83                 gint height;
84         } info_rating;
85
86         /* file ops */
87         struct {
88                 gboolean enable_in_place_rename;
89
90                 gboolean confirm_delete;
91                 gboolean enable_delete_key;
92                 gboolean safe_delete_enable;
93                 gchar *safe_delete_path;
94                 gint safe_delete_folder_maxsize;
95         } file_ops;
96
97         /* image */
98         struct {
99                 gboolean exif_rotate_enable;
100                 gboolean exif_proof_rotate_enable;
101                 guint scroll_reset_method;
102                 gboolean fit_window_to_image;
103                 gboolean limit_window_size;
104                 gint max_window_size;
105                 gboolean limit_autofit_size;
106                 gint max_autofit_size;
107                 gint max_enlargement_size;
108
109                 gint tile_cache_max;    /* in megabytes */
110                 gint image_cache_max;   /* in megabytes */
111                 gboolean enable_read_ahead;
112
113                 ZoomMode zoom_mode;
114                 gboolean zoom_2pass;
115                 gboolean zoom_to_fit_allow_expand;
116                 guint zoom_quality;
117                 gint zoom_increment;    /* 100 is 1.0, 5 is 0.05, 200 is 2.0, etc. */
118                 gboolean use_clutter_renderer;
119
120                 gboolean use_custom_border_color_in_fullscreen;
121                 gboolean use_custom_border_color;
122                 GdkColor border_color;
123                 GdkColor alpha_color_1;
124                 GdkColor alpha_color_2;
125         } image;
126
127         /* thumbnails */
128         struct {
129                 gint max_width;
130                 gint max_height;
131                 gboolean enable_caching;
132                 gboolean cache_into_dirs;
133                 gboolean use_xvpics;
134                 gboolean spec_standard;
135                 guint quality;
136                 gboolean use_exif;
137                 gboolean use_ft_metadata;
138 //              gboolean use_ft_metadata_small;
139         } thumbnails;
140
141         /* file filtering */
142         struct {
143                 gboolean show_hidden_files;
144                 gboolean show_parent_directory;
145                 gboolean show_dot_directory;
146                 gboolean disable_file_extension_checks;
147                 gboolean disable;
148         } file_filter;
149
150         struct {
151                 gchar *ext;
152         } sidecar;
153
154         /* collections */
155         struct {
156                 gboolean rectangular_selection;
157         } collections;
158
159         /* shell */
160         struct {
161                 gchar *path;
162                 gchar *options;
163         } shell;
164
165         /* file sorting */
166         struct {
167                 SortType method;
168                 gboolean ascending;
169                 gboolean case_sensitive; /* file sorting method (case) */
170                 gboolean natural;
171         } file_sort;
172
173         /* slideshow */
174         struct {
175                 gint delay;     /* in tenths of a second */
176                 gboolean random;
177                 gboolean repeat;
178         } slideshow;
179
180         /* fullscreen */
181         struct {
182                 gint screen;
183                 gboolean clean_flip;
184                 gboolean disable_saver;
185                 gboolean above;
186         } fullscreen;
187
188         /* image overlay */
189         struct {
190                 gchar *template_string;
191                 gint x;
192                 gint y;
193                 guint16 text_red;
194                 guint16 text_green;
195                 guint16 text_blue;
196                 guint16 text_alpha;
197                 guint16 background_red;
198                 guint16 background_green;
199                 guint16 background_blue;
200                 guint16 background_alpha;
201                 gchar *font;
202         } image_overlay;
203
204         /* properties dialog */
205         struct {
206                 gchar *tabs_order;
207         } properties;
208
209         /* color profiles */
210         struct {
211                 gboolean enabled;
212                 gint input_type;
213                 gchar *input_file[COLOR_PROFILE_INPUTS];
214                 gchar *input_name[COLOR_PROFILE_INPUTS];
215                 gchar *screen_file;
216                 gboolean use_image;
217                 gboolean use_x11_screen_profile;
218                 gint render_intent;
219         } color_profile;
220
221         /* Helpers programs */
222         struct {
223                 struct {
224                         gchar *command_name;
225                         gchar *command_line;
226                 } html_browser;
227         } helpers;
228
229         /* Metadata */
230         struct {
231                 gboolean enable_metadata_dirs;
232
233                 gboolean save_in_image_file;
234                 gboolean save_legacy_IPTC;
235                 gboolean warn_on_write_problems;
236
237                 gboolean save_legacy_format;
238
239                 gboolean sync_grouped_files;
240
241                 gboolean confirm_write;
242                 gint confirm_timeout;
243                 gboolean confirm_after_timeout;
244                 gboolean confirm_on_image_change;
245                 gboolean confirm_on_dir_change;
246                 gboolean keywords_case_sensitive;
247                 gboolean write_orientation;
248                 gboolean sidecar_extended_name;
249         } metadata;
250
251         /* Stereo */
252         struct {
253                 gint mode;;
254                 gint fsmode;
255                 gboolean enable_fsmode;
256                 gint fixed_w, fixed_h;
257                 gint fixed_x1, fixed_y1;
258                 gint fixed_x2, fixed_y2;
259                 struct { /* options in this struct are packed to mode and fsmode entries */
260                         gboolean mirror_right;
261                         gboolean mirror_left;
262                         gboolean flip_right;
263                         gboolean flip_left;
264                         gboolean swap;
265                         gboolean temp_disable;
266                         gboolean fs_mirror_right;
267                         gboolean fs_mirror_left;
268                         gboolean fs_flip_right;
269                         gboolean fs_flip_left;
270                         gboolean fs_swap;
271                         gboolean fs_temp_disable;
272                 } tmp;
273         } stereo;
274
275         /* copy move rename */
276         struct {
277                 gint auto_start;
278                 gchar *auto_end;
279                 gint auto_padding;
280                 gint formatted_start;
281         } cp_mv_rn;
282
283         /* log window */
284         struct {
285                 gboolean paused;
286                 gboolean line_wrap;
287                 gboolean timer_data;
288         } log_window;
289 };
290
291 ConfOptions *options;
292 CommandLine *command_line;
293
294 ConfOptions *init_options(ConfOptions *options);
295 void setup_default_options(ConfOptions *options);
296 void save_options(ConfOptions *options);
297 gboolean load_options(ConfOptions *options);
298
299 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
300 void free_layout_options_content(LayoutOptions *dest);
301 LayoutOptions *init_layout_options(LayoutOptions *options);
302
303 #endif /* OPTIONS_H */
304 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */