improved metadata preferences
[geeqie.git] / src / options.h
1 /*
2  * Geeqie
3  * Copyright (C) 2008 The Geeqie Team
4  *
5  * Authors: Vladimir Nadvornik, Laurent Monin
6  *
7  * This software is released under the GNU General Public License (GNU GPL).
8  * Please read the included file COPYING for more information.
9  * This software comes with no warranty of any kind, use at your own risk!
10  */
11
12 #ifndef OPTIONS_H
13 #define OPTIONS_H
14
15 typedef struct _ConfOptions ConfOptions;
16
17 struct _ConfOptions
18 {
19         /* ui */
20         gboolean progressive_key_scrolling;
21         gboolean place_dialogs_under_mouse;
22         gboolean mousewheel_scrolls;
23         gboolean show_icon_names;
24         gboolean show_copy_path;
25
26         /* various */
27         gboolean tree_descend_subdirs;
28
29         gboolean lazy_image_sync;
30         gboolean update_on_time_change;
31
32         guint duplicates_similarity_threshold;
33
34         gint open_recent_list_maxsize;
35         gint dnd_icon_size;
36
37
38         /* start up */
39         struct {
40                 gboolean restore_path;
41                 gboolean use_last_path;
42                 gchar *path;
43         } startup;
44
45         /* file ops */
46         struct {
47                 gboolean enable_in_place_rename;
48
49                 gboolean confirm_delete;
50                 gboolean enable_delete_key;
51                 gboolean safe_delete_enable;
52                 gchar *safe_delete_path;
53                 gint safe_delete_folder_maxsize;
54         } file_ops;
55
56         /* image */
57         struct {
58                 gboolean exif_rotate_enable;
59                 guint scroll_reset_method;
60                 gboolean fit_window_to_image;
61                 gboolean limit_window_size;
62                 gint max_window_size;
63                 gboolean limit_autofit_size;
64                 gint max_autofit_size;
65
66                 gint tile_cache_max;    /* in megabytes */
67                 gint image_cache_max;   /* in megabytes */
68                 guint dither_quality;
69                 gboolean enable_read_ahead;
70
71                 ZoomMode zoom_mode;
72                 gboolean zoom_2pass;
73                 gboolean zoom_to_fit_allow_expand;
74                 guint zoom_quality;
75                 gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
76
77                 gint use_custom_border_color;
78                 GdkColor border_color;
79
80                 gint read_buffer_size; /* bytes to read from file per read() */
81                 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
82         } image;
83
84         /* thumbnails */
85         struct {
86                 gint max_width;
87                 gint max_height;
88                 gboolean enable_caching;
89                 gboolean cache_into_dirs;
90                 gboolean fast;
91                 gboolean use_xvpics;
92                 gboolean spec_standard;
93                 guint quality;
94                 gboolean use_exif;
95         } thumbnails;
96
97         /* file filtering */
98         struct {
99                 gboolean show_hidden_files;
100                 gboolean show_dot_directory;
101                 gboolean disable;
102         } file_filter;
103
104         struct {
105                 gchar *ext;
106         } sidecar;
107         
108         /* collections */
109         struct {
110                 gboolean rectangular_selection;
111         } collections;
112
113         /* editors */
114         Editor editor[GQ_EDITOR_SLOTS];
115
116         /* shell */
117         struct {
118                 gchar *path;
119                 gchar *options;
120         } shell;
121         
122         /* file sorting */
123         struct {
124                 SortType method;
125                 gboolean ascending;
126                 gboolean case_sensitive; /* file sorting method (case) */
127         } file_sort;
128
129         /* slideshow */
130         struct {
131                 gint delay;     /* in tenths of a second */
132                 gboolean random;
133                 gboolean repeat;
134         } slideshow;
135
136         /* fullscreen */
137         struct {
138                 gint screen;
139                 gboolean clean_flip;
140                 gboolean disable_saver;
141                 gboolean above;
142         } fullscreen;
143
144         /* histogram */
145         struct {
146                 guint last_channel_mode;
147                 guint last_log_mode;
148         } histogram;
149         
150         /* image overlay */
151         struct {
152                 struct {
153                         guint state;
154                         gboolean show_at_startup;
155                         gchar *template_string;
156                         gint x;
157                         gint y;
158                 } common;
159         } image_overlay;
160
161         /* layout */
162         struct {
163                 gchar *order;
164                 gint style;
165
166                 DirViewType dir_view_type;
167                 FileViewType file_view_type;
168
169                 gboolean show_thumbnails;
170                 gboolean show_marks;
171                 gboolean show_directory_date;
172
173                 struct {
174                         gint w;
175                         gint h;
176                         gint x;
177                         gint y;
178                         gboolean maximized;
179                         gint hdivider_pos;
180                         gint vdivider_pos;
181                 } main_window;
182
183                 struct {
184                         gint w;
185                         gint h;
186                         gint x;
187                         gint y;
188                         gint vdivider_pos;
189                 } float_window;
190
191                 struct {
192                         gint w;
193                         gint h;
194                 } properties_window;
195
196                 gboolean save_window_positions;
197
198                 gboolean tools_float;
199                 gboolean tools_hidden;
200                 gboolean tools_restore_state;
201
202                 gboolean toolbar_hidden;
203                 
204                 gchar *home_path;
205         } layout;
206
207         /* panels */
208         struct {
209                 struct {
210                         gboolean enabled;
211                         gint width;
212                 } info;
213
214                 struct {
215                         gboolean enabled;
216                         gint width;
217                 } exif;
218
219                 struct {
220                         gboolean enabled;
221                         gint mode_state;
222                         gint action_state;
223                         gint selection_state;
224                 } sort;
225         } panels;
226
227         /* properties dialog */
228         struct {
229                 gchar *tabs_order;
230         } properties;
231
232         /* color profiles */
233         struct {
234                 gboolean enabled;
235                 gint input_type;
236                 gchar *input_file[COLOR_PROFILE_INPUTS];
237                 gchar *input_name[COLOR_PROFILE_INPUTS];
238                 gint screen_type;
239                 gchar *screen_file;
240                 gboolean use_image;
241
242         } color_profile;
243
244         /* Helpers programs */
245         struct {
246                 struct {
247                         gchar *command_name;
248                         gchar *command_line;
249                 } html_browser;
250         } helpers;
251
252         /* Various paths and links to documentation */
253         struct {
254                 gchar *helpdir;
255                 gchar *htmldir;
256         } documentation;
257         
258         /* Metadata */
259         struct {
260                 gboolean enable_metadata_dirs;
261
262                 gboolean save_in_image_file;
263                 gboolean save_legacy_IPTC;
264                 gboolean warn_on_write_problems;
265
266                 gboolean save_legacy_format;
267                 
268                 gboolean sync_grouped_files;
269                 
270                 gboolean confirm_write;
271                 gint confirm_timeout;
272                 gboolean confirm_after_timeout;
273                 gboolean confirm_on_image_change;
274                 gboolean confirm_on_dir_change;
275         } metadata;
276
277 };
278
279 ConfOptions *options;
280
281 ConfOptions *init_options(ConfOptions *options);
282 void setup_default_options(ConfOptions *options);
283 void save_options(ConfOptions *options);
284 void load_options(ConfOptions *options);
285
286
287 #endif /* OPTIONS_H */
288 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */