Mercurial > geeqie
comparison src/main.c @ 1462:75721f22155c
initialization clean-up
author | nadvornik |
---|---|
date | Thu, 19 Mar 2009 22:58:28 +0000 |
parents | a3d3208b0c50 |
children | 25168240a247 |
comparison
equal
deleted
inserted
replaced
1461:e015b6573d36 | 1462:75721f22155c |
---|---|
675 exit_program_final(); | 675 exit_program_final(); |
676 } | 676 } |
677 | 677 |
678 void init_after_global_options(void) | 678 void init_after_global_options(void) |
679 { | 679 { |
680 | |
681 mkdir_if_not_exists(get_rc_dir()); | |
682 mkdir_if_not_exists(get_collections_dir()); | |
683 mkdir_if_not_exists(get_thumbnails_cache_dir()); | |
684 mkdir_if_not_exists(get_metadata_cache_dir()); | |
685 | |
686 keys_load(); | |
687 | |
688 filter_add_defaults(); | 680 filter_add_defaults(); |
689 filter_rebuild(); | 681 filter_rebuild(); |
690 | 682 |
691 editor_load_descriptions(); | 683 editor_load_descriptions(); |
692 | |
693 accel_map_load(); | |
694 } | 684 } |
695 | 685 |
696 | 686 |
697 /* This code is supposed to handle situation when a file mmaped by image_loader | 687 /* This code is supposed to handle situation when a file mmaped by image_loader |
698 * or by exif loader is truncated by some other process. | 688 * or by exif loader is truncated by some other process. |
782 pixbuf_inline_register_stock_icons(); | 772 pixbuf_inline_register_stock_icons(); |
783 | 773 |
784 parse_command_line_for_debug_option(argc, argv); | 774 parse_command_line_for_debug_option(argc, argv); |
785 parse_command_line(argc, argv); | 775 parse_command_line(argc, argv); |
786 | 776 |
777 /* these functions don't depend on config file */ | |
778 mkdir_if_not_exists(get_rc_dir()); | |
779 mkdir_if_not_exists(get_collections_dir()); | |
780 mkdir_if_not_exists(get_thumbnails_cache_dir()); | |
781 mkdir_if_not_exists(get_metadata_cache_dir()); | |
782 | |
783 keys_load(); | |
784 accel_map_load(); | |
785 | |
786 /* restore session from the config file */ | |
787 | |
787 options = init_options(NULL); | 788 options = init_options(NULL); |
788 setup_default_options(options); | 789 setup_default_options(options); |
789 | 790 |
790 | |
791 | |
792 /* load_options calls init_after_global_options() after it parses global options, we have to call it here if it fails*/ | 791 /* load_options calls init_after_global_options() after it parses global options, we have to call it here if it fails*/ |
793 if (!load_options(options)) init_after_global_options(); | 792 if (!load_options(options)) init_after_global_options(); |
794 | 793 |
794 /* handle missing config file and commandline additions*/ | |
795 if (!layout_window_list) | 795 if (!layout_window_list) |
796 { | 796 { |
797 /* broken or no config file */ | 797 /* broken or no config file */ |
798 layout_new_from_config(NULL, NULL, TRUE); | 798 layout_new_from_config(NULL, NULL, TRUE); |
799 } | 799 } |