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