added option to use exif thumbnails
[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 enable_metadata_dirs;
28
29         gboolean tree_descend_subdirs;
30
31         gboolean lazy_image_sync;
32         gboolean update_on_time_change;
33
34         guint duplicates_similarity_threshold;
35
36         gint open_recent_list_maxsize;
37         gint dnd_icon_size;
38
39         gboolean save_metadata_in_image_file;
40
41         /* start up */
42         struct {
43                 gboolean restore_path;
44                 gboolean use_last_path;
45                 gchar *path;
46         } startup;
47
48         /* file ops */
49         struct {
50                 gboolean enable_in_place_rename;
51
52                 gboolean confirm_delete;
53                 gboolean enable_delete_key;
54                 gboolean safe_delete_enable;
55                 gchar *safe_delete_path;
56                 gint safe_delete_folder_maxsize;
57         } file_ops;
58
59         /* image */
60         struct {
61                 gboolean exif_rotate_enable;
62                 guint scroll_reset_method;
63                 gboolean fit_window_to_image;
64                 gboolean limit_window_size;
65                 gint max_window_size;
66                 gboolean limit_autofit_size;
67                 gint max_autofit_size;
68
69                 gint tile_cache_max;    /* in megabytes */
70                 gint image_cache_max;   /* in megabytes */
71                 guint dither_quality;
72                 gboolean enable_read_ahead;
73
74                 ZoomMode zoom_mode;
75                 gboolean zoom_2pass;
76                 gboolean zoom_to_fit_allow_expand;
77                 guint zoom_quality;
78                 gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
79
80                 gint use_custom_border_color;
81                 GdkColor border_color;
82
83                 gint read_buffer_size; /* bytes to read from file per read() */
84                 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
85         } image;
86
87         /* thumbnails */
88         struct {
89                 gint max_width;
90                 gint max_height;
91                 gboolean enable_caching;
92                 gboolean cache_into_dirs;
93                 gboolean fast;
94                 gboolean use_xvpics;
95                 gboolean spec_standard;
96                 guint quality;
97                 gboolean use_exif;
98         } thumbnails;
99
100         /* file filtering */
101         struct {
102                 gboolean show_hidden_files;
103                 gboolean show_dot_directory;
104                 gboolean disable;
105         } file_filter;
106
107         /* collections */
108         struct {
109                 gboolean rectangular_selection;
110         } collections;
111
112         /* editors */
113         Editor editor[GQ_EDITOR_SLOTS];
114
115         /* shell */
116         struct {
117                 gchar *path;
118                 gchar *options;
119         } shell;
120         
121         /* file sorting */
122         struct {
123                 SortType method;
124                 gboolean ascending;
125                 gboolean case_sensitive; /* file sorting method (case) */
126         } file_sort;
127
128         /* slideshow */
129         struct {
130                 gint delay;     /* in tenths of a second */
131                 gboolean random;
132                 gboolean repeat;
133         } slideshow;
134
135         /* fullscreen */
136         struct {
137                 gint screen;
138                 gboolean clean_flip;
139                 gboolean disable_saver;
140                 gboolean above;
141         } fullscreen;
142
143         /* histogram */
144         struct {
145                 guint last_channel_mode;
146                 guint last_log_mode;
147         } histogram;
148         
149         /* image overlay */
150         struct {
151                 struct {
152                         guint state;
153                         gboolean show_at_startup;
154                         gchar *template_string;
155                         gint x;
156                         gint y;
157                 } common;
158         } image_overlay;
159
160         /* layout */
161         struct {
162                 gchar *order;
163                 gint style;
164
165                 DirViewType dir_view_type;
166                 FileViewType file_view_type;
167
168                 gboolean show_thumbnails;
169                 gboolean show_marks;
170                 gboolean show_directory_date;
171
172                 struct {
173                         gint w;
174                         gint h;
175                         gint x;
176                         gint y;
177                         gboolean maximized;
178                         gint hdivider_pos;
179                         gint vdivider_pos;
180                 } main_window;
181
182                 struct {
183                         gint w;
184                         gint h;
185                         gint x;
186                         gint y;
187                         gint vdivider_pos;
188                 } float_window;
189
190                 struct {
191                         gint w;
192                         gint h;
193                 } properties_window;
194
195                 gboolean save_window_positions;
196
197                 gboolean tools_float;
198                 gboolean tools_hidden;
199                 gboolean tools_restore_state;
200
201                 gboolean toolbar_hidden;
202                 
203                 gchar *home_path;
204         } layout;
205
206         /* panels */
207         struct {
208                 struct {
209                         gboolean enabled;
210                         gint width;
211                 } info;
212
213                 struct {
214                         gboolean enabled;
215                         gint width;
216                 } exif;
217
218                 struct {
219                         gboolean enabled;
220                         gint mode_state;
221                         gint action_state;
222                         gint selection_state;
223                 } sort;
224         } panels;
225
226         /* properties dialog */
227         struct {
228                 gchar *tabs_order;
229         } properties;
230
231         /* color profiles */
232         struct {
233                 gboolean enabled;
234                 gint input_type;
235                 gchar *input_file[COLOR_PROFILE_INPUTS];
236                 gchar *input_name[COLOR_PROFILE_INPUTS];
237                 gint screen_type;
238                 gchar *screen_file;
239                 gboolean use_image;
240
241         } color_profile;
242
243         /* Helpers programs */
244         struct {
245                 struct {
246                         gchar *command_name;
247                         gchar *command_line;
248                 } html_browser;
249         } helpers;
250
251         /* Various paths and links to documentation */
252         struct {
253                 gchar *helpdir;
254                 gchar *htmldir;
255         } documentation;
256 };
257
258 ConfOptions *options;
259
260 ConfOptions *init_options(ConfOptions *options);
261 void setup_default_options(ConfOptions *options);
262 void save_options(ConfOptions *options);
263 void load_options(ConfOptions *options);
264
265
266 #endif /* OPTIONS_H */
267 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */