use "keywords" instead of "tags" in option name, it is more consistent
[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
25         /* various */
26         gboolean tree_descend_subdirs;
27
28         gboolean lazy_image_sync;
29         gboolean update_on_time_change;
30
31         guint duplicates_similarity_threshold;
32
33         gint open_recent_list_maxsize;
34         gint dnd_icon_size;
35
36         gboolean save_window_positions;
37         gboolean tools_restore_state;
38
39         /* file ops */
40         struct {
41                 gboolean enable_in_place_rename;
42
43                 gboolean confirm_delete;
44                 gboolean enable_delete_key;
45                 gboolean safe_delete_enable;
46                 gchar *safe_delete_path;
47                 gint safe_delete_folder_maxsize;
48         } file_ops;
49
50         /* image */
51         struct {
52                 gboolean exif_rotate_enable;
53                 guint scroll_reset_method;
54                 gboolean fit_window_to_image;
55                 gboolean limit_window_size;
56                 gint max_window_size;
57                 gboolean limit_autofit_size;
58                 gint max_autofit_size;
59
60                 gint tile_cache_max;    /* in megabytes */
61                 gint image_cache_max;   /* in megabytes */
62                 guint dither_quality;
63                 gboolean enable_read_ahead;
64
65                 ZoomMode zoom_mode;
66                 gboolean zoom_2pass;
67                 gboolean zoom_to_fit_allow_expand;
68                 guint zoom_quality;
69                 gint zoom_increment;    /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */
70
71                 gint use_custom_border_color;
72                 GdkColor border_color;
73         } image;
74
75         /* thumbnails */
76         struct {
77                 gint max_width;
78                 gint max_height;
79                 gboolean enable_caching;
80                 gboolean cache_into_dirs;
81                 gboolean use_xvpics;
82                 gboolean spec_standard;
83                 guint quality;
84                 gboolean use_exif;
85         } thumbnails;
86
87         /* file filtering */
88         struct {
89                 gboolean show_hidden_files;
90                 gboolean show_dot_directory;
91                 gboolean disable;
92         } file_filter;
93
94         struct {
95                 gchar *ext;
96         } sidecar;
97         
98         /* collections */
99         struct {
100                 gboolean rectangular_selection;
101         } collections;
102
103         /* shell */
104         struct {
105                 gchar *path;
106                 gchar *options;
107         } shell;
108         
109         /* file sorting */
110         struct {
111                 SortType method;
112                 gboolean ascending;
113                 gboolean case_sensitive; /* file sorting method (case) */
114         } file_sort;
115
116         /* slideshow */
117         struct {
118                 gint delay;     /* in tenths of a second */
119                 gboolean random;
120                 gboolean repeat;
121         } slideshow;
122
123         /* fullscreen */
124         struct {
125                 gint screen;
126                 gboolean clean_flip;
127                 gboolean disable_saver;
128                 gboolean above;
129         } fullscreen;
130
131         /* image overlay */
132         struct {
133                 gchar *template_string;
134                 gint x;
135                 gint y;
136         } image_overlay;
137
138         /* properties dialog */
139         struct {
140                 gchar *tabs_order;
141         } properties;
142
143         /* color profiles */
144         struct {
145                 gboolean enabled;
146                 gint input_type;
147                 gchar *input_file[COLOR_PROFILE_INPUTS];
148                 gchar *input_name[COLOR_PROFILE_INPUTS];
149                 gchar *screen_file;
150                 gboolean use_image;
151                 gboolean use_x11_screen_profile;
152
153         } color_profile;
154
155         /* Helpers programs */
156         struct {
157                 struct {
158                         gchar *command_name;
159                         gchar *command_line;
160                 } html_browser;
161         } helpers;
162
163         /* Metadata */
164         struct {
165                 gboolean enable_metadata_dirs;
166
167                 gboolean save_in_image_file;
168                 gboolean save_legacy_IPTC;
169                 gboolean warn_on_write_problems;
170
171                 gboolean save_legacy_format;
172                 
173                 gboolean sync_grouped_files;
174                 
175                 gboolean confirm_write;
176                 gint confirm_timeout;
177                 gboolean confirm_after_timeout;
178                 gboolean confirm_on_image_change;
179                 gboolean confirm_on_dir_change;
180                 gboolean keywords_case_sensitive;
181                 gboolean write_orientation;
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: */