Option to display window ID
[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         /* info sidebar component heights */
65         struct {
66                 gint height;
67         } info_comment;
68
69         struct {
70                 gint height;
71         } info_keywords;
72
73         struct {
74                 gint height;
75         } info_title;
76
77         struct {
78                 gint height;
79         } info_rating;
80
81         /* file ops */
82         struct {
83                 gboolean enable_in_place_rename;
84
85                 gboolean confirm_delete;
86                 gboolean enable_delete_key;
87                 gboolean safe_delete_enable;
88                 gchar *safe_delete_path;
89                 gint safe_delete_folder_maxsize;
90         } file_ops;
91
92         /* image */
93         struct {
94                 gboolean exif_rotate_enable;
95                 gboolean exif_proof_rotate_enable;
96                 guint scroll_reset_method;
97                 gboolean fit_window_to_image;
98                 gboolean limit_window_size;
99                 gint max_window_size;
100                 gboolean limit_autofit_size;
101                 gint max_autofit_size;
102                 gint max_enlargement_size;
103
104                 gint tile_cache_max;    /* in megabytes */
105                 gint image_cache_max;   /* in megabytes */
106                 gboolean enable_read_ahead;
107
108                 ZoomMode zoom_mode;
109                 gboolean zoom_2pass;
110                 gboolean zoom_to_fit_allow_expand;
111                 guint zoom_quality;
112                 gint zoom_increment;    /* 100 is 1.0, 5 is 0.05, 200 is 2.0, etc. */
113                 gboolean use_clutter_renderer;
114
115                 gboolean use_custom_border_color_in_fullscreen;
116                 gboolean use_custom_border_color;
117                 GdkColor border_color;
118                 GdkColor alpha_color_1;
119                 GdkColor alpha_color_2;
120         } image;
121
122         /* thumbnails */
123         struct {
124                 gint max_width;
125                 gint max_height;
126                 gboolean enable_caching;
127                 gboolean cache_into_dirs;
128                 gboolean use_xvpics;
129                 gboolean spec_standard;
130                 guint quality;
131                 gboolean use_exif;
132                 gboolean use_ft_metadata;
133 //              gboolean use_ft_metadata_small;
134         } thumbnails;
135
136         /* file filtering */
137         struct {
138                 gboolean show_hidden_files;
139                 gboolean show_parent_directory;
140                 gboolean show_dot_directory;
141                 gboolean disable_file_extension_checks;
142                 gboolean disable;
143         } file_filter;
144
145         struct {
146                 gchar *ext;
147         } sidecar;
148
149         /* collections */
150         struct {
151                 gboolean rectangular_selection;
152         } collections;
153
154         /* shell */
155         struct {
156                 gchar *path;
157                 gchar *options;
158         } shell;
159
160         /* file sorting */
161         struct {
162                 SortType method;
163                 gboolean ascending;
164                 gboolean case_sensitive; /* file sorting method (case) */
165                 gboolean natural;
166         } file_sort;
167
168         /* slideshow */
169         struct {
170                 gint delay;     /* in tenths of a second */
171                 gboolean random;
172                 gboolean repeat;
173         } slideshow;
174
175         /* fullscreen */
176         struct {
177                 gint screen;
178                 gboolean clean_flip;
179                 gboolean disable_saver;
180                 gboolean above;
181         } fullscreen;
182
183         /* image overlay */
184         struct {
185                 gchar *template_string;
186                 gint x;
187                 gint y;
188                 guint16 text_red;
189                 guint16 text_green;
190                 guint16 text_blue;
191                 guint16 text_alpha;
192                 guint16 background_red;
193                 guint16 background_green;
194                 guint16 background_blue;
195                 guint16 background_alpha;
196                 gchar *font;
197         } image_overlay;
198
199         /* properties dialog */
200         struct {
201                 gchar *tabs_order;
202         } properties;
203
204         /* color profiles */
205         struct {
206                 gboolean enabled;
207                 gint input_type;
208                 gchar *input_file[COLOR_PROFILE_INPUTS];
209                 gchar *input_name[COLOR_PROFILE_INPUTS];
210                 gchar *screen_file;
211                 gboolean use_image;
212                 gboolean use_x11_screen_profile;
213                 gint render_intent;
214         } color_profile;
215
216         /* Helpers programs */
217         struct {
218                 struct {
219                         gchar *command_name;
220                         gchar *command_line;
221                 } html_browser;
222         } helpers;
223
224         /* Metadata */
225         struct {
226                 gboolean enable_metadata_dirs;
227
228                 gboolean save_in_image_file;
229                 gboolean save_legacy_IPTC;
230                 gboolean warn_on_write_problems;
231
232                 gboolean save_legacy_format;
233
234                 gboolean sync_grouped_files;
235
236                 gboolean confirm_write;
237                 gint confirm_timeout;
238                 gboolean confirm_after_timeout;
239                 gboolean confirm_on_image_change;
240                 gboolean confirm_on_dir_change;
241                 gboolean keywords_case_sensitive;
242                 gboolean write_orientation;
243                 gboolean sidecar_extended_name;
244         } metadata;
245
246         /* Stereo */
247         struct {
248                 gint mode;;
249                 gint fsmode;
250                 gboolean enable_fsmode;
251                 gint fixed_w, fixed_h;
252                 gint fixed_x1, fixed_y1;
253                 gint fixed_x2, fixed_y2;
254                 struct { /* options in this struct are packed to mode and fsmode entries */
255                         gboolean mirror_right;
256                         gboolean mirror_left;
257                         gboolean flip_right;
258                         gboolean flip_left;
259                         gboolean swap;
260                         gboolean temp_disable;
261                         gboolean fs_mirror_right;
262                         gboolean fs_mirror_left;
263                         gboolean fs_flip_right;
264                         gboolean fs_flip_left;
265                         gboolean fs_swap;
266                         gboolean fs_temp_disable;
267                 } tmp;
268         } stereo;
269
270         /* copy move rename */
271         struct {
272                 gint auto_start;
273                 gchar *auto_end;
274                 gint auto_padding;
275                 gint formatted_start;
276         } cp_mv_rn;
277
278         /* log window */
279         struct {
280                 gboolean paused;
281                 gboolean line_wrap;
282                 gboolean timer_data;
283         } log_window;
284 };
285
286 ConfOptions *options;
287 CommandLine *command_line;
288
289 ConfOptions *init_options(ConfOptions *options);
290 void setup_default_options(ConfOptions *options);
291 void save_options(ConfOptions *options);
292 gboolean load_options(ConfOptions *options);
293
294 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
295 void free_layout_options_content(LayoutOptions *dest);
296 LayoutOptions *init_layout_options(LayoutOptions *options);
297
298 #endif /* OPTIONS_H */
299 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */