startup path options simplified and moved to layout options
[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
75                 gint read_buffer_size; /* bytes to read from file per read() */
76                 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */
77         } image;
78
79         /* thumbnails */
80         struct {
81                 gint max_width;
82                 gint max_height;
83                 gboolean enable_caching;
84                 gboolean cache_into_dirs;
85                 gboolean fast;
86                 gboolean use_xvpics;
87                 gboolean spec_standard;
88                 guint quality;
89                 gboolean use_exif;
90         } thumbnails;
91
92         /* file filtering */
93         struct {
94                 gboolean show_hidden_files;
95                 gboolean show_dot_directory;
96                 gboolean disable;
97         } file_filter;
98
99         struct {
100                 gchar *ext;
101         } sidecar;
102         
103         /* collections */
104         struct {
105                 gboolean rectangular_selection;
106         } collections;
107
108         /* shell */
109         struct {
110                 gchar *path;
111                 gchar *options;
112         } shell;
113         
114         /* file sorting */
115         struct {
116                 SortType method;
117                 gboolean ascending;
118                 gboolean case_sensitive; /* file sorting method (case) */
119         } file_sort;
120
121         /* slideshow */
122         struct {
123                 gint delay;     /* in tenths of a second */
124                 gboolean random;
125                 gboolean repeat;
126         } slideshow;
127
128         /* fullscreen */
129         struct {
130                 gint screen;
131                 gboolean clean_flip;
132                 gboolean disable_saver;
133                 gboolean above;
134         } fullscreen;
135
136         /* image overlay */
137         struct {
138                 gchar *template_string;
139                 gint x;
140                 gint y;
141         } image_overlay;
142
143         /* properties dialog */
144         struct {
145                 gchar *tabs_order;
146         } properties;
147
148         /* color profiles */
149         struct {
150                 gboolean enabled;
151                 gint input_type;
152                 gchar *input_file[COLOR_PROFILE_INPUTS];
153                 gchar *input_name[COLOR_PROFILE_INPUTS];
154                 gint screen_type;
155                 gchar *screen_file;
156                 gboolean use_image;
157
158         } color_profile;
159
160         /* Helpers programs */
161         struct {
162                 struct {
163                         gchar *command_name;
164                         gchar *command_line;
165                 } html_browser;
166         } helpers;
167
168         /* Metadata */
169         struct {
170                 gboolean enable_metadata_dirs;
171
172                 gboolean save_in_image_file;
173                 gboolean save_legacy_IPTC;
174                 gboolean warn_on_write_problems;
175
176                 gboolean save_legacy_format;
177                 
178                 gboolean sync_grouped_files;
179                 
180                 gboolean confirm_write;
181                 gint confirm_timeout;
182                 gboolean confirm_after_timeout;
183                 gboolean confirm_on_image_change;
184                 gboolean confirm_on_dir_change;
185         } metadata;
186
187 };
188
189 ConfOptions *options;
190 CommandLine *command_line;
191
192 ConfOptions *init_options(ConfOptions *options);
193 void setup_default_options(ConfOptions *options);
194 void save_options(ConfOptions *options);
195 gboolean load_options(ConfOptions *options);
196
197 void copy_layout_options(LayoutOptions *dest, const LayoutOptions *src);
198 void free_layout_options_content(LayoutOptions *dest);
199 LayoutOptions *init_layout_options(LayoutOptions *options);
200
201 #endif /* OPTIONS_H */
202 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */