Mercurial > geeqie
annotate src/options.h @ 1251:ecfe3732f00a
fixed glib warning
| author | nadvornik |
|---|---|
| date | Sat, 24 Jan 2009 12:15:01 +0000 |
| parents | b2d98b7c26c1 |
| children | dfa378900ec9 |
| 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 tree_descend_subdirs; |
| 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 lazy_image_sync; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
30 gboolean update_on_time_change; |
| 508 | 31 |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
32 guint duplicates_similarity_threshold; |
| 508 | 33 |
| 34 gint open_recent_list_maxsize; | |
| 35 gint dnd_icon_size; | |
| 36 | |
|
594
4cfce4ed35e0
Use a dedicated option to enable keywords and comment saving as XMP tags
zas_
parents:
556
diff
changeset
|
37 |
|
884
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
38 /* start up */ |
| 629 | 39 struct { |
| 40 gboolean restore_path; | |
|
630
83d3ded39e49
An option to save and restore the last path used was added.
zas_
parents:
629
diff
changeset
|
41 gboolean use_last_path; |
| 629 | 42 gchar *path; |
| 43 } startup; | |
| 44 | |
| 508 | 45 /* file ops */ |
| 46 struct { | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
47 gboolean enable_in_place_rename; |
| 508 | 48 |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
49 gboolean confirm_delete; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
50 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
|
51 gboolean safe_delete_enable; |
| 508 | 52 gchar *safe_delete_path; |
| 53 gint safe_delete_folder_maxsize; | |
| 54 } file_ops; | |
| 55 | |
| 56 /* image */ | |
| 57 struct { | |
| 858 | 58 gboolean exif_rotate_enable; |
| 59 guint scroll_reset_method; | |
| 60 gboolean fit_window_to_image; | |
| 61 gboolean limit_window_size; | |
| 508 | 62 gint max_window_size; |
| 858 | 63 gboolean limit_autofit_size; |
| 508 | 64 gint max_autofit_size; |
| 65 | |
| 66 gint tile_cache_max; /* in megabytes */ | |
| 848 | 67 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
|
68 guint dither_quality; |
| 858 | 69 gboolean enable_read_ahead; |
| 508 | 70 |
|
885
ad420f2eb789
Use a specific enum for image.zoom_mode values (ZoomMode) and
zas_
parents:
884
diff
changeset
|
71 ZoomMode zoom_mode; |
| 858 | 72 gboolean zoom_2pass; |
| 73 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
|
74 guint zoom_quality; |
| 508 | 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; | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
88 gboolean enable_caching; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
89 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
|
90 gboolean fast; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
91 gboolean use_xvpics; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
92 gboolean spec_standard; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
93 guint quality; |
| 1060 | 94 gboolean use_exif; |
| 508 | 95 } thumbnails; |
| 96 | |
| 97 /* file filtering */ | |
| 98 struct { | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
99 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
|
100 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
|
101 gboolean disable; |
| 508 | 102 } file_filter; |
| 103 | |
|
1229
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1208
diff
changeset
|
104 struct { |
|
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1208
diff
changeset
|
105 gchar *ext; |
|
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1208
diff
changeset
|
106 } sidecar; |
|
878718372aca
sidecar files grouping was made case-insensitive
nadvornik
parents:
1208
diff
changeset
|
107 |
| 508 | 108 /* collections */ |
| 109 struct { | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
110 gboolean rectangular_selection; |
| 508 | 111 } collections; |
| 112 | |
| 113 /* editors */ | |
| 730 | 114 Editor editor[GQ_EDITOR_SLOTS]; |
| 508 | 115 |
|
737
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
116 /* shell */ |
|
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
117 struct { |
|
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
118 gchar *path; |
|
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
119 gchar *options; |
|
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
120 } shell; |
|
8a8873e7a552
Make shell command and its option rc file options instead of hardcoded strings.
zas_
parents:
736
diff
changeset
|
121 |
| 508 | 122 /* file sorting */ |
| 123 struct { | |
| 124 SortType method; | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
125 gboolean ascending; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
126 gboolean case_sensitive; /* file sorting method (case) */ |
| 508 | 127 } file_sort; |
| 128 | |
| 129 /* slideshow */ | |
| 130 struct { | |
| 131 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
|
132 gboolean random; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
133 gboolean repeat; |
| 508 | 134 } slideshow; |
| 135 | |
| 136 /* fullscreen */ | |
| 137 struct { | |
| 138 gint screen; | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
139 gboolean clean_flip; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
140 gboolean disable_saver; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
141 gboolean above; |
| 508 | 142 } fullscreen; |
| 143 | |
| 612 | 144 /* histogram */ |
| 145 struct { | |
| 146 guint last_channel_mode; | |
| 147 guint last_log_mode; | |
| 148 } histogram; | |
| 149 | |
| 508 | 150 /* image overlay */ |
| 151 struct { | |
| 152 struct { | |
|
638
8cc9f349c670
Rename option image_overlay.common.enabled to image_overlay.common.state
zas_
parents:
630
diff
changeset
|
153 guint state; |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
154 gboolean show_at_startup; |
| 508 | 155 gchar *template_string; |
|
822
df541dc41707
Allow to set image overlay info position through options:
zas_
parents:
764
diff
changeset
|
156 gint x; |
|
df541dc41707
Allow to set image overlay info position through options:
zas_
parents:
764
diff
changeset
|
157 gint y; |
| 508 | 158 } common; |
| 159 } image_overlay; | |
| 160 | |
| 161 /* layout */ | |
| 162 struct { | |
| 163 gchar *order; | |
| 164 gint style; | |
| 165 | |
| 166 DirViewType dir_view_type; | |
|
556
fe675761d091
Replace Layout icon_view field by more generic file_view_type.
zas_
parents:
508
diff
changeset
|
167 FileViewType file_view_type; |
| 508 | 168 |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
169 gboolean show_thumbnails; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
170 gboolean show_marks; |
| 825 | 171 gboolean show_directory_date; |
| 508 | 172 |
| 173 struct { | |
| 174 gint w; | |
| 175 gint h; | |
| 176 gint x; | |
| 177 gint y; | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
178 gboolean maximized; |
| 508 | 179 gint hdivider_pos; |
| 180 gint vdivider_pos; | |
| 181 } main_window; | |
| 182 | |
| 183 struct { | |
| 184 gint w; | |
| 185 gint h; | |
| 186 gint x; | |
| 187 gint y; | |
| 188 gint vdivider_pos; | |
| 189 } float_window; | |
| 190 | |
|
764
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
191 struct { |
|
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
192 gint w; |
|
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
193 gint h; |
|
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
194 } properties_window; |
|
ae618ebec3e9
Save properties window width and height to rc file and restore
zas_
parents:
740
diff
changeset
|
195 |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
196 gboolean save_window_positions; |
| 508 | 197 |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
198 gboolean tools_float; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
199 gboolean tools_hidden; |
|
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
200 gboolean tools_restore_state; |
| 508 | 201 |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
202 gboolean toolbar_hidden; |
|
980
a4a38ea9fbaa
Add an option named layout.home_path which modifies the behavior of the Home button.
zas_
parents:
885
diff
changeset
|
203 |
|
a4a38ea9fbaa
Add an option named layout.home_path which modifies the behavior of the Home button.
zas_
parents:
885
diff
changeset
|
204 gchar *home_path; |
| 508 | 205 } layout; |
| 206 | |
| 207 /* panels */ | |
| 208 struct { | |
| 209 struct { | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
210 gboolean enabled; |
| 508 | 211 gint width; |
| 212 } info; | |
| 213 | |
| 214 struct { | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
215 gboolean enabled; |
| 508 | 216 gint width; |
| 217 } exif; | |
| 218 | |
| 219 struct { | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
220 gboolean enabled; |
| 508 | 221 gint mode_state; |
| 222 gint action_state; | |
| 223 gint selection_state; | |
| 224 } sort; | |
| 225 } panels; | |
| 226 | |
| 684 | 227 /* properties dialog */ |
| 228 struct { | |
| 229 gchar *tabs_order; | |
| 230 } properties; | |
| 508 | 231 |
| 232 /* color profiles */ | |
| 233 struct { | |
|
870
3dd2cb78d0f9
Make better matching between options types in options.h and the rest of the code.
zas_
parents:
858
diff
changeset
|
234 gboolean enabled; |
| 508 | 235 gint input_type; |
| 236 gchar *input_file[COLOR_PROFILE_INPUTS]; | |
| 237 gchar *input_name[COLOR_PROFILE_INPUTS]; | |
| 238 gint screen_type; | |
| 239 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
|
240 gboolean use_image; |
| 508 | 241 |
| 242 } color_profile; | |
| 243 | |
|
884
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
244 /* Helpers programs */ |
|
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
245 struct { |
|
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
246 struct { |
|
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
247 gchar *command_name; |
|
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
248 gchar *command_line; |
|
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
249 } html_browser; |
|
ff16ed0d2c8a
Improve ways to specify html browser (used for help, see bug 2015099).
zas_
parents:
870
diff
changeset
|
250 } helpers; |
|
1013
88ebc61e33ae
Allow to override documentation paths through options:
zas_
parents:
980
diff
changeset
|
251 |
|
88ebc61e33ae
Allow to override documentation paths through options:
zas_
parents:
980
diff
changeset
|
252 /* Various paths and links to documentation */ |
|
88ebc61e33ae
Allow to override documentation paths through options:
zas_
parents:
980
diff
changeset
|
253 struct { |
|
88ebc61e33ae
Allow to override documentation paths through options:
zas_
parents:
980
diff
changeset
|
254 gchar *helpdir; |
|
88ebc61e33ae
Allow to override documentation paths through options:
zas_
parents:
980
diff
changeset
|
255 gchar *htmldir; |
|
88ebc61e33ae
Allow to override documentation paths through options:
zas_
parents:
980
diff
changeset
|
256 } documentation; |
| 1208 | 257 |
| 258 /* Metadata */ | |
| 259 struct { | |
| 260 gboolean enable_metadata_dirs; | |
| 261 | |
| 262 gboolean save_in_image_file; | |
| 263 gboolean save_legacy_IPTC; | |
| 264 gboolean warn_on_write_problems; | |
| 265 | |
| 266 gboolean save_legacy_format; | |
| 267 | |
| 268 gboolean sync_grouped_files; | |
| 269 | |
| 270 gboolean confirm_write; | |
| 271 gint confirm_timeout; | |
| 1244 | 272 gboolean confirm_after_timeout; |
| 1208 | 273 gboolean confirm_on_image_change; |
| 274 gboolean confirm_on_dir_change; | |
| 275 } metadata; | |
| 276 | |
| 508 | 277 }; |
| 278 | |
| 279 ConfOptions *options; | |
| 280 | |
| 281 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
|
282 void setup_default_options(ConfOptions *options); |
| 1019 | 283 void save_options(ConfOptions *options); |
| 284 void load_options(ConfOptions *options); | |
| 285 | |
| 508 | 286 |
| 287 #endif /* OPTIONS_H */ | |
|
1055
1646720364cf
Adding a vim modeline to all files - patch by Klaus Ethgen
nadvornik
parents:
1019
diff
changeset
|
288 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */ |
