added options for metadata - not yet used
[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         /* collections */
105         struct {
106                 gboolean rectangular_selection;
107         } collections;
108
109         /* editors */
110         Editor editor[GQ_EDITOR_SLOTS];
111
112         /* shell */
113         struct {
114                 gchar *path;
115                 gchar *options;
116         } shell;
117         
118         /* file sorting */
119         struct {
120                 SortType method;
121                 gboolean ascending;
122                 gboolean case_sensitive; /* file sorting method (case) */
123         } file_sort;
124
125         /* slideshow */
126         struct {
127                 gint delay;     /* in tenths of a second */
128                 gboolean random;
129                 gboolean repeat;
130         } slideshow;
131
132         /* fullscreen */
133         struct {
134                 gint screen;
135                 gboolean clean_flip;
136                 gboolean disable_saver;
137                 gboolean above;
138         } fullscreen;
139
140         /* histogram */
141         struct {
142                 guint last_channel_mode;
143                 guint last_log_mode;
144         } histogram;
145         
146         /* image overlay */
147         struct {
148                 struct {
149                         guint state;
150                         gboolean show_at_startup;
151                         gchar *template_string;
152                         gint x;
153                         gint y;
154                 } common;
155         } image_overlay;
156
157         /* layout */
158         struct {
159                 gchar *order;
160                 gint style;
161
162                 DirViewType dir_view_type;
163                 FileViewType file_view_type;
164
165                 gboolean show_thumbnails;
166                 gboolean show_marks;
167                 gboolean show_directory_date;
168
169                 struct {
170                         gint w;
171                         gint h;
172                         gint x;
173                         gint y;
174                         gboolean maximized;
175                         gint hdivider_pos;
176                         gint vdivider_pos;
177                 } main_window;
178
179                 struct {
180                         gint w;
181                         gint h;
182                         gint x;
183                         gint y;
184                         gint vdivider_pos;
185                 } float_window;
186
187                 struct {
188                         gint w;
189                         gint h;
190                 } properties_window;
191
192                 gboolean save_window_positions;
193
194                 gboolean tools_float;
195                 gboolean tools_hidden;
196                 gboolean tools_restore_state;
197
198                 gboolean toolbar_hidden;
199                 
200                 gchar *home_path;
201         } layout;
202
203         /* panels */
204         struct {
205                 struct {
206                         gboolean enabled;
207                         gint width;
208                 } info;
209
210                 struct {
211                         gboolean enabled;
212                         gint width;
213                 } exif;
214
215                 struct {
216                         gboolean enabled;
217                         gint mode_state;
218                         gint action_state;
219                         gint selection_state;
220                 } sort;
221         } panels;
222
223         /* properties dialog */
224         struct {
225                 gchar *tabs_order;
226         } properties;
227
228         /* color profiles */
229         struct {
230                 gboolean enabled;
231                 gint input_type;
232                 gchar *input_file[COLOR_PROFILE_INPUTS];
233                 gchar *input_name[COLOR_PROFILE_INPUTS];
234                 gint screen_type;
235                 gchar *screen_file;
236                 gboolean use_image;
237
238         } color_profile;
239
240         /* Helpers programs */
241         struct {
242                 struct {
243                         gchar *command_name;
244                         gchar *command_line;
245                 } html_browser;
246         } helpers;
247
248         /* Various paths and links to documentation */
249         struct {
250                 gchar *helpdir;
251                 gchar *htmldir;
252         } documentation;
253         
254         /* Metadata */
255         struct {
256                 gboolean enable_metadata_dirs;
257
258                 gboolean save_in_image_file;
259                 gboolean save_legacy_IPTC;
260                 gboolean warn_on_write_problems;
261
262                 gboolean save_legacy_format;
263                 
264                 gboolean sync_grouped_files;
265                 
266                 gboolean confirm_write;
267                 gint confirm_timeout;
268                 gboolean confirm_on_image_change;
269                 gboolean confirm_on_dir_change;
270         } metadata;
271
272 };
273
274 ConfOptions *options;
275
276 ConfOptions *init_options(ConfOptions *options);
277 void setup_default_options(ConfOptions *options);
278 void save_options(ConfOptions *options);
279 void load_options(ConfOptions *options);
280
281
282 #endif /* OPTIONS_H */
283 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */