Eliminate FIXME: enable or disable individual plugins from configure
[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         gboolean show_star_rating;
38         gboolean show_guidelines;
39         gboolean draw_rectangle;
40         gboolean show_predefined_keyword_tree;
41
42         /* various */
43         gboolean tree_descend_subdirs;
44         gboolean view_dir_list_single_click_enter;
45
46         gboolean lazy_image_sync;
47         gboolean update_on_time_change;
48
49         guint duplicates_similarity_threshold;
50         guint duplicates_match;
51         gboolean duplicates_thumbnails;
52         guint duplicates_select_type;
53         gboolean rot_invariant_sim;
54         gboolean sort_totals;
55
56         gint open_recent_list_maxsize;
57         gint dnd_icon_size;
58         gint clipboard_selection;
59
60         gboolean save_window_positions;
61         gboolean use_saved_window_positions_for_new_windows;
62         gboolean tools_restore_state;
63         gboolean save_dialog_window_positions;
64         gboolean show_window_ids;
65
66         gint log_window_lines;
67
68         gboolean marks_save;            // save marks on exit
69         gchar *marks_tooltips[FILEDATA_MARKS_SIZE];
70
71         gboolean with_rename;
72         gboolean collections_on_top;
73
74         gchar *help_search_engine;
75
76         /* info sidebar component heights */
77         struct {
78                 gint height;
79         } info_comment;
80
81         struct {
82                 gint height;
83         } info_keywords;
84
85         struct {
86                 gint height;
87         } info_title;
88
89         struct {
90                 gint height;
91         } info_rating;
92
93         /* file ops */
94         struct {
95                 gboolean enable_in_place_rename;
96
97                 gboolean confirm_delete;
98                 gboolean enable_delete_key;
99                 gboolean safe_delete_enable;
100                 gchar *safe_delete_path;
101                 gint safe_delete_folder_maxsize;
102         } file_ops;
103
104         /* image */
105         struct {
106                 gboolean exif_rotate_enable;
107                 gboolean exif_proof_rotate_enable;
108                 guint scroll_reset_method;
109                 gboolean fit_window_to_image;
110                 gboolean limit_window_size;
111                 gint max_window_size;
112                 gboolean limit_autofit_size;
113                 gint max_autofit_size;
114                 gint max_enlargement_size;
115
116                 gint tile_cache_max;    /* in megabytes */
117                 gint image_cache_max;   /* in megabytes */
118                 gboolean enable_read_ahead;
119
120                 ZoomMode zoom_mode;
121                 gboolean zoom_2pass;
122                 gboolean zoom_to_fit_allow_expand;
123                 guint zoom_quality;
124                 gint zoom_increment;    /* 100 is 1.0, 5 is 0.05, 200 is 2.0, etc. */
125                 gboolean use_clutter_renderer;
126
127                 gboolean use_custom_border_color_in_fullscreen;
128                 gboolean use_custom_border_color;
129                 GdkColor border_color;
130                 GdkColor alpha_color_1;
131                 GdkColor alpha_color_2;
132         } image;
133
134         /* thumbnails */
135         struct {
136                 gint max_width;
137                 gint max_height;
138                 gboolean enable_caching;
139                 gboolean cache_into_dirs;
140                 gboolean use_xvpics;
141                 gboolean spec_standard;
142                 guint quality;
143                 gboolean use_exif;
144                 gboolean use_ft_metadata;
145                 gint collection_preview;
146 //              gboolean use_ft_metadata_small;
147         } thumbnails;
148
149         /* file filtering */
150         struct {
151                 gboolean show_hidden_files;
152                 gboolean show_parent_directory;
153                 gboolean show_dot_directory;
154                 gboolean disable_file_extension_checks;
155                 gboolean disable;
156         } file_filter;
157
158         struct {
159                 gchar *ext;
160         } sidecar;
161
162         /* collections */
163         struct {
164                 gboolean rectangular_selection;
165         } collections;
166
167         /* shell */
168         struct {
169                 gchar *path;
170                 gchar *options;
171         } shell;
172
173         /* file sorting */
174         struct {
175                 SortType method;
176                 gboolean ascending;
177                 gboolean case_sensitive; /* file sorting method (case) */
178                 gboolean natural;
179         } file_sort;
180
181         /* slideshow */
182         struct {
183                 gint delay;     /* in tenths of a second */
184                 gboolean random;
185                 gboolean repeat;
186         } slideshow;
187
188         /* fullscreen */
189         struct {
190                 gint screen;
191                 gboolean clean_flip;
192                 gboolean disable_saver;
193                 gboolean above;
194         } fullscreen;
195
196         /* image overlay */
197         struct {
198                 gchar *template_string;
199                 gint x;
200                 gint y;
201                 guint16 text_red;
202                 guint16 text_green;
203                 guint16 text_blue;
204                 guint16 text_alpha;
205                 guint16 background_red;
206                 guint16 background_green;
207                 guint16 background_blue;
208                 guint16 background_alpha;
209                 gchar *font;
210         } image_overlay;
211
212         /* properties dialog */
213         struct {
214                 gchar *tabs_order;
215         } properties;
216
217         /* color profiles */
218         struct {
219                 gboolean enabled;
220                 gint input_type;
221                 gchar *input_file[COLOR_PROFILE_INPUTS];
222                 gchar *input_name[COLOR_PROFILE_INPUTS];
223                 gchar *screen_file;
224                 gboolean use_image;
225                 gboolean use_x11_screen_profile;
226                 gint render_intent;
227         } color_profile;
228
229         /* Helpers programs */
230         struct {
231                 struct {
232                         gchar *command_name;
233                         gchar *command_line;
234                 } html_browser;
235         } helpers;
236
237         /* Metadata */
238         struct {
239                 gboolean enable_metadata_dirs;
240
241                 gboolean save_in_image_file;
242                 gboolean save_legacy_IPTC;
243                 gboolean warn_on_write_problems;
244
245                 gboolean save_legacy_format;
246
247                 gboolean sync_grouped_files;
248
249                 gboolean confirm_write;
250                 gint confirm_timeout;
251                 gboolean confirm_after_timeout;
252                 gboolean confirm_on_image_change;
253                 gboolean confirm_on_dir_change;
254                 gboolean keywords_case_sensitive;
255                 gboolean write_orientation;
256                 gboolean sidecar_extended_name;
257         } metadata;
258
259         /* Stereo */
260         struct {
261                 gint mode;;
262                 gint fsmode;
263                 gboolean enable_fsmode;
264                 gint fixed_w, fixed_h;
265                 gint fixed_x1, fixed_y1;
266                 gint fixed_x2, fixed_y2;
267                 struct { /* options in this struct are packed to mode and fsmode entries */
268                         gboolean mirror_right;
269                         gboolean mirror_left;
270                         gboolean flip_right;
271                         gboolean flip_left;
272                         gboolean swap;
273                         gboolean temp_disable;
274                         gboolean fs_mirror_right;
275                         gboolean fs_mirror_left;
276                         gboolean fs_flip_right;
277                         gboolean fs_flip_left;
278                         gboolean fs_swap;
279                         gboolean fs_temp_disable;
280                 } tmp;
281         } stereo;
282
283         /* copy move rename */
284         struct {
285                 gint auto_start;
286                 gchar *auto_end;
287                 gint auto_padding;
288                 gint formatted_start;
289         } cp_mv_rn;
290
291         /* log window */
292         struct {
293                 gboolean paused;
294                 gboolean line_wrap;
295                 gboolean timer_data;
296         } log_window;
297
298         /* star rating */
299         struct {
300                 gunichar star;
301                 gunichar rejected;
302         } star_rating;
303
304         /* Printer */
305         struct {
306                 gchar *image_font;
307                 gchar *page_font;
308                 gint text_fields;
309                 gboolean show_image_text;
310                 gboolean show_page_text;
311                 gchar *page_text;
312                 gint image_text_position;
313                 gint page_text_position;
314         } printer;
315
316         gboolean read_metadata_in_idle;
317
318         GList *disabled_plugins;
319 };
320
321 ConfOptions *options;
322 CommandLine *command_line;
323
324 ConfOptions *init_options(ConfOptions *options);
325 void setup_default_options(ConfOptions *options);
326 void save_options(ConfOptions *options);
327 gboolean load_options(ConfOptions *options);
328
329 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
330 void free_layout_options_content(LayoutOptions *dest);
331 LayoutOptions *init_layout_options(LayoutOptions *options);
332
333 #endif /* OPTIONS_H */
334 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */