dropped read_buffer options - they don't have any significant effect
[geeqie.git] / src / options.h
1 /*
2  * Geeqie
3  * Copyright (C) 2008 - 2009 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         gboolean save_window_positions;
38         gboolean tools_restore_state;
39
40         /* file ops */
41         struct {
42                 gboolean enable_in_place_rename;
43
44                 gboolean confirm_delete;
45                 gboolean enable_delete_key;
46                 gboolean safe_delete_enable;
47                 gchar *safe_delete_path;
48                 gint safe_delete_folder_maxsize;
49         } file_ops;
50
51         /* image */
52         struct {
53                 gboolean exif_rotate_enable;
54                 guint scroll_reset_method;
55                 gboolean fit_window_to_image;
56                 gboolean limit_window_size;
57                 gint max_window_size;
58                 gboolean limit_autofit_size;
59                 gint max_autofit_size;
60
61                 gint tile_cache_max;    /* in megabytes */
62                 gint image_cache_max;   /* in megabytes */
63                 guint dither_quality;
64                 gboolean enable_read_ahead;
65
66                 ZoomMode zoom_mode;
67                 gboolean zoom_2pass;
68                 gboolean zoom_to_fit_allow_expand;
69                 guint zoom_quality;
70                 gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
71
72                 gint use_custom_border_color;
73                 GdkColor border_color;
74         } image;
75
76         /* thumbnails */
77         struct {
78                 gint max_width;
79                 gint max_height;
80                 gboolean enable_caching;
81                 gboolean cache_into_dirs;
82                 gboolean fast;
83                 gboolean use_xvpics;
84                 gboolean spec_standard;
85                 guint quality;
86                 gboolean use_exif;
87         } thumbnails;
88
89         /* file filtering */
90         struct {
91                 gboolean show_hidden_files;
92                 gboolean show_dot_directory;
93                 gboolean disable;
94         } file_filter;
95
96         struct {
97                 gchar *ext;
98         } sidecar;
99         
100         /* collections */
101         struct {
102                 gboolean rectangular_selection;
103         } collections;
104
105         /* shell */
106         struct {
107                 gchar *path;
108                 gchar *options;
109         } shell;
110         
111         /* file sorting */
112         struct {
113                 SortType method;
114                 gboolean ascending;
115                 gboolean case_sensitive; /* file sorting method (case) */
116         } file_sort;
117
118         /* slideshow */
119         struct {
120                 gint delay;     /* in tenths of a second */
121                 gboolean random;
122                 gboolean repeat;
123         } slideshow;
124
125         /* fullscreen */
126         struct {
127                 gint screen;
128                 gboolean clean_flip;
129                 gboolean disable_saver;
130                 gboolean above;
131         } fullscreen;
132
133         /* image overlay */
134         struct {
135                 gchar *template_string;
136                 gint x;
137                 gint y;
138         } image_overlay;
139
140         /* properties dialog */
141         struct {
142                 gchar *tabs_order;
143         } properties;
144
145         /* color profiles */
146         struct {
147                 gboolean enabled;
148                 gint input_type;
149                 gchar *input_file[COLOR_PROFILE_INPUTS];
150                 gchar *input_name[COLOR_PROFILE_INPUTS];
151                 gint screen_type;
152                 gchar *screen_file;
153                 gboolean use_image;
154
155         } color_profile;
156
157         /* Helpers programs */
158         struct {
159                 struct {
160                         gchar *command_name;
161                         gchar *command_line;
162                 } html_browser;
163         } helpers;
164
165         /* Metadata */
166         struct {
167                 gboolean enable_metadata_dirs;
168
169                 gboolean save_in_image_file;
170                 gboolean save_legacy_IPTC;
171                 gboolean warn_on_write_problems;
172
173                 gboolean save_legacy_format;
174                 
175                 gboolean sync_grouped_files;
176                 
177                 gboolean confirm_write;
178                 gint confirm_timeout;
179                 gboolean confirm_after_timeout;
180                 gboolean confirm_on_image_change;
181                 gboolean confirm_on_dir_change;
182         } metadata;
183
184 };
185
186 ConfOptions *options;
187 CommandLine *command_line;
188
189 ConfOptions *init_options(ConfOptions *options);
190 void setup_default_options(ConfOptions *options);
191 void save_options(ConfOptions *options);
192 gboolean load_options(ConfOptions *options);
193
194 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
195 void free_layout_options_content(LayoutOptions *dest);
196 LayoutOptions *init_layout_options(LayoutOptions *options);
197
198 #endif /* OPTIONS_H */
199 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */