Mercurial > geeqie.yaz
comparison src/rcfile.c @ 335:0cb7f0ac5c20
Beautify rc file, adding sub-sections titles.
author | zas_ |
---|---|
date | Sat, 12 Apr 2008 15:13:00 +0000 |
parents | df868b947aa0 |
children | 0565ee45b8ac |
comparison
equal
deleted
inserted
replaced
334:df868b947aa0 | 335:0cb7f0ac5c20 |
---|---|
273 secure_fprintf(ssi, "# but user comments and formatting will be lost.\n"); | 273 secure_fprintf(ssi, "# but user comments and formatting will be lost.\n"); |
274 secure_fputc(ssi, '\n'); | 274 secure_fputc(ssi, '\n'); |
275 | 275 |
276 secure_fprintf(ssi, "##### General Options #####\n\n"); | 276 secure_fprintf(ssi, "##### General Options #####\n\n"); |
277 | 277 |
278 write_int_option(ssi, "layout.style", options->layout.style); | |
279 write_char_option(ssi, "layout.order", options->layout.order); | |
280 secure_fputc(ssi, '\n'); | |
281 | |
282 write_bool_option(ssi, "layout.view_as_icons", options->layout.view_as_icons); | |
283 write_bool_option(ssi, "layout.view_as_tree", options->layout.view_as_tree); | |
284 write_bool_option(ssi, "show_icon_names", options->show_icon_names); | 278 write_bool_option(ssi, "show_icon_names", options->show_icon_names); |
285 secure_fputc(ssi, '\n'); | 279 secure_fputc(ssi, '\n'); |
286 | 280 |
287 write_bool_option(ssi, "tree_descend_folders", options->tree_descend_subdirs); | 281 write_bool_option(ssi, "tree_descend_folders", options->tree_descend_subdirs); |
288 write_bool_option(ssi, "lazy_image_sync", options->lazy_image_sync); | 282 write_bool_option(ssi, "lazy_image_sync", options->lazy_image_sync); |
289 write_bool_option(ssi, "update_on_time_change", options->update_on_time_change); | 283 write_bool_option(ssi, "update_on_time_change", options->update_on_time_change); |
290 write_bool_option(ssi, "exif_auto_rotate", options->image.exif_rotate_enable); | |
291 secure_fputc(ssi, '\n'); | 284 secure_fputc(ssi, '\n'); |
292 | 285 |
293 write_bool_option(ssi, "enable_startup_path", options->startup_path_enable); | 286 write_bool_option(ssi, "enable_startup_path", options->startup_path_enable); |
294 write_char_option(ssi, "startup_path", options->startup_path); | 287 write_char_option(ssi, "startup_path", options->startup_path); |
295 secure_fputc(ssi, '\n'); | 288 |
296 | 289 write_bool_option(ssi, "progressive_keyboard_scrolling", options->progressive_key_scrolling); |
297 secure_fprintf(ssi, "##### Image Options #####\n\n"); | 290 write_bool_option(ssi, "local_metadata", options->enable_metadata_dirs); |
291 | |
292 write_bool_option(ssi, "confirm_delete", options->confirm_delete); | |
293 write_bool_option(ssi, "enable_delete_key", options->enable_delete_key); | |
294 write_bool_option(ssi, "safe_delete", options->safe_delete_enable); | |
295 write_char_option(ssi, "safe_delete_path", options->safe_delete_path); | |
296 write_int_option(ssi, "safe_delete_size", options->safe_delete_size); | |
297 secure_fputc(ssi, '\n'); | |
298 | |
299 write_int_option(ssi, "custom_similarity_threshold", options->dupe_custom_threshold); | |
300 secure_fputc(ssi, '\n'); | |
301 | |
302 write_bool_option(ssi, "tools_float", options->tools_float); | |
303 write_bool_option(ssi, "tools_hidden", options->tools_hidden); | |
304 write_bool_option(ssi, "restore_tool_state", options->restore_tool); | |
305 write_bool_option(ssi, "toolbar_hidden", options->toolbar_hidden); | |
306 secure_fputc(ssi, '\n'); | |
307 | |
308 write_bool_option(ssi, "mouse_wheel_scrolls", options->mousewheel_scrolls); | |
309 write_bool_option(ssi, "in_place_rename", options->enable_in_place_rename); | |
310 write_int_option(ssi, "open_recent_max", options->recent_list_max); | |
311 write_bool_option(ssi, "display_dialogs_under_mouse", options->place_dialogs_under_mouse); | |
312 secure_fputc(ssi, '\n'); | |
313 | |
314 write_bool_option(ssi, "user_specified_window_background", options->user_specified_window_background); | |
315 write_color_option(ssi, "window_background_color", &options->window_background_color); | |
316 | |
317 | |
318 secure_fprintf(ssi, "\n##### Layout Options #####\n\n"); | |
319 | |
320 write_int_option(ssi, "layout.style", options->layout.style); | |
321 write_char_option(ssi, "layout.order", options->layout.order); | |
322 write_bool_option(ssi, "layout.view_as_icons", options->layout.view_as_icons); | |
323 write_bool_option(ssi, "layout.view_as_tree", options->layout.view_as_tree); | |
324 | |
325 | |
326 secure_fprintf(ssi, "\n##### Image Options #####\n\n"); | |
298 | 327 |
299 secure_fprintf(ssi, "image.zoom_mode: "); | 328 secure_fprintf(ssi, "image.zoom_mode: "); |
300 if (options->image.zoom_mode == ZOOM_RESET_ORIGINAL) secure_fprintf(ssi, "original\n"); | 329 if (options->image.zoom_mode == ZOOM_RESET_ORIGINAL) secure_fprintf(ssi, "original\n"); |
301 if (options->image.zoom_mode == ZOOM_RESET_FIT_WINDOW) secure_fprintf(ssi, "fit\n"); | 330 if (options->image.zoom_mode == ZOOM_RESET_FIT_WINDOW) secure_fprintf(ssi, "fit\n"); |
302 if (options->image.zoom_mode == ZOOM_RESET_NONE) secure_fprintf(ssi, "dont_change\n"); | 331 if (options->image.zoom_mode == ZOOM_RESET_NONE) secure_fprintf(ssi, "dont_change\n"); |
311 write_int_option(ssi, "image_cache_size_max", options->image.tile_cache_max); | 340 write_int_option(ssi, "image_cache_size_max", options->image.tile_cache_max); |
312 write_int_option(ssi, "image.zoom_quality", options->image.zoom_quality); | 341 write_int_option(ssi, "image.zoom_quality", options->image.zoom_quality); |
313 write_int_option(ssi, "image.dither_quality", options->image.dither_quality); | 342 write_int_option(ssi, "image.dither_quality", options->image.dither_quality); |
314 write_int_option(ssi, "image.zoom_increment", options->image.zoom_increment); | 343 write_int_option(ssi, "image.zoom_increment", options->image.zoom_increment); |
315 write_bool_option(ssi, "image.enable_read_ahead", options->image.enable_read_ahead); | 344 write_bool_option(ssi, "image.enable_read_ahead", options->image.enable_read_ahead); |
316 secure_fputc(ssi, '\n'); | 345 write_bool_option(ssi, "image.exif_rotate_enable", options->image.exif_rotate_enable); |
317 | 346 |
318 write_bool_option(ssi, "progressive_keyboard_scrolling", options->progressive_key_scrolling); | 347 |
319 secure_fputc(ssi, '\n'); | 348 secure_fprintf(ssi, "\n##### Thumbnails Options #####\n\n"); |
320 | 349 |
321 write_bool_option(ssi, "thumbnails.enabled", options->thumbnails.enabled); | 350 write_bool_option(ssi, "thumbnails.enabled", options->thumbnails.enabled); |
322 write_int_option(ssi, "thumbnails.max_width", options->thumbnails.max_width); | 351 write_int_option(ssi, "thumbnails.max_width", options->thumbnails.max_width); |
323 write_int_option(ssi, "thumbnails.max_height", options->thumbnails.max_height); | 352 write_int_option(ssi, "thumbnails.max_height", options->thumbnails.max_height); |
324 write_bool_option(ssi, "thumbnails.enable_caching", options->thumbnails.enable_caching); | 353 write_bool_option(ssi, "thumbnails.enable_caching", options->thumbnails.enable_caching); |
325 write_bool_option(ssi, "thumbnails.cache_into_dirs", options->thumbnails.cache_into_dirs); | 354 write_bool_option(ssi, "thumbnails.cache_into_dirs", options->thumbnails.cache_into_dirs); |
326 write_bool_option(ssi, "thumbnails.fast", options->thumbnails.fast); | 355 write_bool_option(ssi, "thumbnails.fast", options->thumbnails.fast); |
327 write_bool_option(ssi, "thumbnails.use_xvpics", options->thumbnails.use_xvpics); | 356 write_bool_option(ssi, "thumbnails.use_xvpics", options->thumbnails.use_xvpics); |
328 write_bool_option(ssi, "thumbnails.spec_standard", options->thumbnails.spec_standard); | 357 write_bool_option(ssi, "thumbnails.spec_standard", options->thumbnails.spec_standard); |
329 write_int_option(ssi, "thumbnails.quality", options->thumbnails.quality); | 358 write_int_option(ssi, "thumbnails.quality", options->thumbnails.quality); |
330 secure_fputc(ssi, '\n'); | 359 |
331 | 360 |
332 write_bool_option(ssi, "local_metadata", options->enable_metadata_dirs); | 361 secure_fprintf(ssi, "\n##### File sorting Options #####\n\n"); |
333 secure_fputc(ssi, '\n'); | |
334 | 362 |
335 write_int_option(ssi, "file_sort.method", (gint)options->file_sort.method); | 363 write_int_option(ssi, "file_sort.method", (gint)options->file_sort.method); |
336 write_bool_option(ssi, "file_sort.ascending", options->file_sort.ascending); | 364 write_bool_option(ssi, "file_sort.ascending", options->file_sort.ascending); |
337 write_bool_option(ssi, "file_sort.case_sensitive", options->file_sort.case_sensitive); | 365 write_bool_option(ssi, "file_sort.case_sensitive", options->file_sort.case_sensitive); |
338 secure_fputc(ssi, '\n'); | 366 |
339 | 367 |
340 write_bool_option(ssi, "confirm_delete", options->confirm_delete); | 368 secure_fprintf(ssi, "\n##### Fullscreen Options #####\n\n"); |
341 write_bool_option(ssi, "enable_delete_key", options->enable_delete_key); | |
342 write_bool_option(ssi, "safe_delete", options->safe_delete_enable); | |
343 write_char_option(ssi, "safe_delete_path", options->safe_delete_path); | |
344 write_int_option(ssi, "safe_delete_size", options->safe_delete_size); | |
345 secure_fputc(ssi, '\n'); | |
346 | |
347 write_bool_option(ssi, "tools_float", options->tools_float); | |
348 write_bool_option(ssi, "tools_hidden", options->tools_hidden); | |
349 write_bool_option(ssi, "restore_tool_state", options->restore_tool); | |
350 write_bool_option(ssi, "toolbar_hidden", options->toolbar_hidden); | |
351 secure_fputc(ssi, '\n'); | |
352 | |
353 write_bool_option(ssi, "mouse_wheel_scrolls", options->mousewheel_scrolls); | |
354 write_bool_option(ssi, "in_place_rename", options->enable_in_place_rename); | |
355 write_int_option(ssi, "open_recent_max", options->recent_list_max); | |
356 write_bool_option(ssi, "display_dialogs_under_mouse", options->place_dialogs_under_mouse); | |
357 secure_fputc(ssi, '\n'); | |
358 | |
359 write_bool_option(ssi, "user_specified_window_background", options->user_specified_window_background); | |
360 write_color_option(ssi, "window_background_color", &options->window_background_color); | |
361 secure_fputc(ssi, '\n'); | |
362 | 369 |
363 write_int_option(ssi, "fullscreen.screen", options->fullscreen.screen); | 370 write_int_option(ssi, "fullscreen.screen", options->fullscreen.screen); |
364 write_bool_option(ssi, "fullscreen.clean_flip", options->fullscreen.clean_flip); | 371 write_bool_option(ssi, "fullscreen.clean_flip", options->fullscreen.clean_flip); |
365 write_bool_option(ssi, "fullscreen.disable_saver", options->fullscreen.disable_saver); | 372 write_bool_option(ssi, "fullscreen.disable_saver", options->fullscreen.disable_saver); |
366 write_bool_option(ssi, "fullscreen.above", options->fullscreen.above); | 373 write_bool_option(ssi, "fullscreen.above", options->fullscreen.above); |
367 write_bool_option(ssi, "fullscreen.show_info", options->fullscreen.show_info); | 374 write_bool_option(ssi, "fullscreen.show_info", options->fullscreen.show_info); |
368 write_char_option(ssi, "fullscreen.info", options->fullscreen.info); | 375 write_char_option(ssi, "fullscreen.info", options->fullscreen.info); |
369 secure_fputc(ssi, '\n'); | |
370 | |
371 write_int_option(ssi, "custom_similarity_threshold", options->dupe_custom_threshold); | |
372 | 376 |
373 secure_fprintf(ssi, "\n##### Slideshow Options #####\n\n"); | 377 secure_fprintf(ssi, "\n##### Slideshow Options #####\n\n"); |
374 | 378 |
375 write_int_unit_option(ssi, "slideshow.delay", options->slideshow.delay, SLIDESHOW_SUBSECOND_PRECISION); | 379 write_int_unit_option(ssi, "slideshow.delay", options->slideshow.delay, SLIDESHOW_SUBSECOND_PRECISION); |
376 | |
377 write_bool_option(ssi, "slideshow.random", options->slideshow.random); | 380 write_bool_option(ssi, "slideshow.random", options->slideshow.random); |
378 write_bool_option(ssi, "slideshow.repeat", options->slideshow.repeat); | 381 write_bool_option(ssi, "slideshow.repeat", options->slideshow.repeat); |
382 | |
379 | 383 |
380 secure_fprintf(ssi, "\n##### Filtering Options #####\n\n"); | 384 secure_fprintf(ssi, "\n##### Filtering Options #####\n\n"); |
381 | 385 |
382 write_bool_option(ssi, "file_filter.show_dot_files", options->file_filter.show_dot_files); | 386 write_bool_option(ssi, "file_filter.show_dot_files", options->file_filter.show_dot_files); |
383 write_bool_option(ssi, "file_filter.disable", options->file_filter.disable); | 387 write_bool_option(ssi, "file_filter.disable", options->file_filter.disable); |
542 "tree_descend_folders", value, options->tree_descend_subdirs); | 546 "tree_descend_folders", value, options->tree_descend_subdirs); |
543 options->lazy_image_sync = read_bool_option(f, option, | 547 options->lazy_image_sync = read_bool_option(f, option, |
544 "lazy_image_sync", value, options->lazy_image_sync); | 548 "lazy_image_sync", value, options->lazy_image_sync); |
545 options->update_on_time_change = read_bool_option(f, option, | 549 options->update_on_time_change = read_bool_option(f, option, |
546 "update_on_time_change", value, options->update_on_time_change); | 550 "update_on_time_change", value, options->update_on_time_change); |
547 options->image.exif_rotate_enable = read_bool_option(f, option, | 551 |
548 "exif_auto_rotate", value, options->image.exif_rotate_enable); | |
549 | |
550 options->startup_path_enable = read_bool_option(f, option, | 552 options->startup_path_enable = read_bool_option(f, option, |
551 "enable_startup_path", value, options->startup_path_enable); | 553 "enable_startup_path", value, options->startup_path_enable); |
552 options->startup_path = read_char_option(f, option, | 554 options->startup_path = read_char_option(f, option, |
553 "startup_path", value_all, options->startup_path); | 555 "startup_path", value_all, options->startup_path); |
554 | 556 |
582 "image.dither_quality", value, options->image.dither_quality), GDK_RGB_DITHER_NONE, GDK_RGB_DITHER_MAX); | 584 "image.dither_quality", value, options->image.dither_quality), GDK_RGB_DITHER_NONE, GDK_RGB_DITHER_MAX); |
583 options->image.zoom_increment = read_int_option(f, option, | 585 options->image.zoom_increment = read_int_option(f, option, |
584 "image.zoom_increment", value, options->image.zoom_increment); | 586 "image.zoom_increment", value, options->image.zoom_increment); |
585 options->image.enable_read_ahead = read_bool_option(f, option, | 587 options->image.enable_read_ahead = read_bool_option(f, option, |
586 "image.enable_read_ahead", value, options->image.enable_read_ahead); | 588 "image.enable_read_ahead", value, options->image.enable_read_ahead); |
589 options->image.exif_rotate_enable = read_bool_option(f, option, | |
590 "image.exif_rotate_enable", value, options->image.exif_rotate_enable); | |
587 | 591 |
588 options->progressive_key_scrolling = read_bool_option(f, option, | 592 options->progressive_key_scrolling = read_bool_option(f, option, |
589 "progressive_keyboard_scrolling", value, options->progressive_key_scrolling); | 593 "progressive_keyboard_scrolling", value, options->progressive_key_scrolling); |
590 | 594 |
591 | 595 |