Mercurial > geeqie.yaz
annotate src/options.h @ 872:caf27dd8f8e0
fixed division by zero in pixbuf_renderer_get_scroll_center
author | nadvornik |
---|---|
date | Mon, 30 Jun 2008 21:08:28 +0000 |
parents | 3dd2cb78d0f9 |
children | ff16ed0d2c8a |
rev | line source |
---|---|
508 | 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 */ | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
20 gboolean progressive_key_scrolling; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
21 gboolean place_dialogs_under_mouse; |
736 | 22 gboolean mousewheel_scrolls; |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
23 gboolean show_icon_names; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
24 gboolean show_copy_path; |
508 | 25 |
26 /* various */ | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
27 gboolean enable_metadata_dirs; |
508 | 28 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
29 gboolean tree_descend_subdirs; |
508 | 30 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
31 gboolean lazy_image_sync; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
32 gboolean update_on_time_change; |
508 | 33 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
34 guint duplicates_similarity_threshold; |
508 | 35 |
36 gint open_recent_list_maxsize; | |
37 gint dnd_icon_size; | |
38 | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
39 gboolean save_metadata_in_image_file; |
594
4cfce4ed35e0
Use a dedicated option to enable keywords and comment saving as XMP tags
zas_
parents:
556
diff
changeset
|
40 |
629 | 41 struct { |
42 gboolean restore_path; | |
630
83d3ded39e49
An option to save and restore the last path used was added.
zas_
parents:
629
diff
changeset
|
43 gboolean use_last_path; |
629 | 44 gchar *path; |
45 } startup; | |
46 | |
508 | 47 /* file ops */ |
48 struct { | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
49 gboolean enable_in_place_rename; |
508 | 50 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
51 gboolean confirm_delete; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
52 gboolean enable_delete_key; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
53 gboolean safe_delete_enable; |
508 | 54 gchar *safe_delete_path; |
55 gint safe_delete_folder_maxsize; | |
56 } file_ops; | |
57 | |
58 /* image */ | |
59 struct { | |
858 | 60 gboolean exif_rotate_enable; |
61 guint scroll_reset_method; | |
62 gboolean fit_window_to_image; | |
63 gboolean limit_window_size; | |
508 | 64 gint max_window_size; |
858 | 65 gboolean limit_autofit_size; |
508 | 66 gint max_autofit_size; |
67 | |
68 gint tile_cache_max; /* in megabytes */ | |
848 | 69 gint image_cache_max; /* in megabytes */ |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
70 guint dither_quality; |
858 | 71 gboolean enable_read_ahead; |
508 | 72 |
73 gint zoom_mode; | |
858 | 74 gboolean zoom_2pass; |
75 gboolean zoom_to_fit_allow_expand; | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
76 guint zoom_quality; |
508 | 77 gint zoom_increment; /* 10 is 1.0, 5 is 0.05, 20 is 2.0, etc. */ |
78 | |
79 gint use_custom_border_color; | |
80 GdkColor border_color; | |
81 | |
82 gint read_buffer_size; /* bytes to read from file per read() */ | |
83 gint idle_read_loop_count; /* the number of bytes to read per idle call (define x image.read_buffer_size) */ | |
84 } image; | |
85 | |
86 /* thumbnails */ | |
87 struct { | |
88 gint max_width; | |
89 gint max_height; | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
90 gboolean enable_caching; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
91 gboolean cache_into_dirs; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
92 gboolean fast; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
93 gboolean use_xvpics; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
94 gboolean spec_standard; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
95 guint quality; |
508 | 96 } thumbnails; |
97 | |
98 /* file filtering */ | |
99 struct { | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
100 gboolean show_hidden_files; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
101 gboolean show_dot_directory; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
102 gboolean disable; |
508 | 103 } file_filter; |
104 | |
105 /* collections */ | |
106 struct { | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
107 gboolean rectangular_selection; |
508 | 108 } collections; |
109 | |
110 /* editors */ | |
730 | 111 Editor editor[GQ_EDITOR_SLOTS]; |
508 | 112 |
737
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
113 /* shell */ |
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
114 struct { |
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
115 gchar *path; |
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
116 gchar *options; |
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
117 } shell; |
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
118 |
508 | 119 /* file sorting */ |
120 struct { | |
121 SortType method; | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
122 gboolean ascending; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
123 gboolean case_sensitive; /* file sorting method (case) */ |
508 | 124 } file_sort; |
125 | |
126 /* slideshow */ | |
127 struct { | |
128 gint delay; /* in tenths of a second */ | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
129 gboolean random; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
130 gboolean repeat; |
508 | 131 } slideshow; |
132 | |
133 /* fullscreen */ | |
134 struct { | |
135 gint screen; | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
136 gboolean clean_flip; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
137 gboolean disable_saver; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
138 gboolean above; |
508 | 139 } fullscreen; |
140 | |
612 | 141 /* histogram */ |
142 struct { | |
143 guint last_channel_mode; | |
144 guint last_log_mode; | |
145 } histogram; | |
146 | |
508 | 147 /* image overlay */ |
148 struct { | |
149 struct { | |
638
8cc9f349c670
Rename option image_overlay.common.enabled to image_overlay.common.state
zas_
parents:
630
diff
changeset
|
150 guint state; |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
151 gboolean show_at_startup; |
508 | 152 gchar *template_string; |
822
df541dc41707
Allow to set image overlay info position through options:
zas_
parents:
764
diff
changeset
|
153 gint x; |
df541dc41707
Allow to set image overlay info position through options:
zas_
parents:
764
diff
changeset
|
154 gint y; |
508 | 155 } common; |
156 } image_overlay; | |
157 | |
158 /* layout */ | |
159 struct { | |
160 gchar *order; | |
161 gint style; | |
162 | |
163 DirViewType dir_view_type; | |
556
fe675761d091
Replace Layout icon_view field by more generic file_view_type.
zas_
parents:
508
diff
changeset
|
164 FileViewType file_view_type; |
508 | 165 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
166 gboolean show_thumbnails; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
167 gboolean show_marks; |
825 | 168 gboolean show_directory_date; |
508 | 169 |
170 struct { | |
171 gint w; | |
172 gint h; | |
173 gint x; | |
174 gint y; | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
175 gboolean maximized; |
508 | 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 | |
764
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
188 struct { |
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
189 gint w; |
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
190 gint h; |
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
191 } properties_window; |
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
192 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
193 gboolean save_window_positions; |
508 | 194 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
195 gboolean tools_float; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
196 gboolean tools_hidden; |
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
197 gboolean tools_restore_state; |
508 | 198 |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
199 gboolean toolbar_hidden; |
508 | 200 |
201 } layout; | |
202 | |
203 /* panels */ | |
204 struct { | |
205 struct { | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
206 gboolean enabled; |
508 | 207 gint width; |
208 } info; | |
209 | |
210 struct { | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
211 gboolean enabled; |
508 | 212 gint width; |
213 } exif; | |
214 | |
215 struct { | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
216 gboolean enabled; |
508 | 217 gint mode_state; |
218 gint action_state; | |
219 gint selection_state; | |
220 } sort; | |
221 } panels; | |
222 | |
684 | 223 /* properties dialog */ |
224 struct { | |
225 gchar *tabs_order; | |
226 } properties; | |
508 | 227 |
228 /* color profiles */ | |
229 struct { | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
230 gboolean enabled; |
508 | 231 gint input_type; |
232 gchar *input_file[COLOR_PROFILE_INPUTS]; | |
233 gchar *input_name[COLOR_PROFILE_INPUTS]; | |
234 gint screen_type; | |
235 gchar *screen_file; | |
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
236 gboolean use_image; |
508 | 237 |
238 } color_profile; | |
239 | |
240 }; | |
241 | |
242 ConfOptions *options; | |
243 | |
244 ConfOptions *init_options(ConfOptions *options); | |
740
9b0ac8d58c89
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
zas_
parents:
737
diff
changeset
|
245 void setup_default_options(ConfOptions *options); |
9b0ac8d58c89
Move setup_default_options() and sync_options_with_current_state() to options.[ch].
zas_
parents:
737
diff
changeset
|
246 void sync_options_with_current_state(ConfOptions *options); |
508 | 247 |
248 #endif /* OPTIONS_H */ |