Mercurial > geeqie
comparison src/main.c @ 1735:6cae2af8fdd1
added messages for debugging startup time
author | nadvornik |
---|---|
date | Sun, 06 Sep 2009 09:08:37 +0000 |
parents | b52deba688e9 |
children | 8e64965c1d92 |
comparison
equal
deleted
inserted
replaced
1734:d3060e56fbf2 | 1735:6cae2af8fdd1 |
---|---|
762 file_data_register_notify_func(collect_manager_notify_cb, NULL, NOTIFY_PRIORITY_LOW); | 762 file_data_register_notify_func(collect_manager_notify_cb, NULL, NOTIFY_PRIORITY_LOW); |
763 file_data_register_notify_func(metadata_notify_cb, NULL, NOTIFY_PRIORITY_LOW); | 763 file_data_register_notify_func(metadata_notify_cb, NULL, NOTIFY_PRIORITY_LOW); |
764 | 764 |
765 | 765 |
766 gtkrc_load(); | 766 gtkrc_load(); |
767 | 767 |
768 parse_command_line_for_debug_option(argc, argv); | |
769 DEBUG_1("%s main: gtk_init", get_exec_time()); | |
768 #ifdef HAVE_LIBCHAMPLAIN | 770 #ifdef HAVE_LIBCHAMPLAIN |
769 #ifdef HAVE_LIBCHAMPLAIN_GTK | 771 #ifdef HAVE_LIBCHAMPLAIN_GTK |
770 gtk_clutter_init(&argc, &argv); | 772 gtk_clutter_init(&argc, &argv); |
771 #else | 773 #else |
772 gtk_init(&argc, &argv); | 774 gtk_init(&argc, &argv); |
783 log_printf("!!! compiled with GTK+-%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION); | 785 log_printf("!!! compiled with GTK+-%d.%d\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION); |
784 log_printf("!!! running with GTK+-%d.%d\n", gtk_major_version, gtk_minor_version); | 786 log_printf("!!! running with GTK+-%d.%d\n", gtk_major_version, gtk_minor_version); |
785 log_printf("!!! %s may quit unexpectedly with a relocation error.\n", GQ_APPNAME); | 787 log_printf("!!! %s may quit unexpectedly with a relocation error.\n", GQ_APPNAME); |
786 } | 788 } |
787 | 789 |
790 DEBUG_1("%s main: pixbuf_inline_register_stock_icons", get_exec_time()); | |
788 pixbuf_inline_register_stock_icons(); | 791 pixbuf_inline_register_stock_icons(); |
789 | 792 |
790 parse_command_line_for_debug_option(argc, argv); | 793 DEBUG_1("%s main: parse_command_line", get_exec_time()); |
791 parse_command_line(argc, argv); | 794 parse_command_line(argc, argv); |
792 | 795 |
796 DEBUG_1("%s main: mkdir_if_not_exists", get_exec_time()); | |
793 /* these functions don't depend on config file */ | 797 /* these functions don't depend on config file */ |
794 mkdir_if_not_exists(get_rc_dir()); | 798 mkdir_if_not_exists(get_rc_dir()); |
795 mkdir_if_not_exists(get_collections_dir()); | 799 mkdir_if_not_exists(get_collections_dir()); |
796 mkdir_if_not_exists(get_thumbnails_cache_dir()); | 800 mkdir_if_not_exists(get_thumbnails_cache_dir()); |
797 mkdir_if_not_exists(get_metadata_cache_dir()); | 801 mkdir_if_not_exists(get_metadata_cache_dir()); |
804 /* restore session from the config file */ | 808 /* restore session from the config file */ |
805 | 809 |
806 options = init_options(NULL); | 810 options = init_options(NULL); |
807 setup_default_options(options); | 811 setup_default_options(options); |
808 | 812 |
813 DEBUG_1("%s main: load_options", get_exec_time()); | |
809 if (!load_options(options)) | 814 if (!load_options(options)) |
810 { | 815 { |
811 /* load_options calls these functions after it parses global options, we have to call it here if it fails */ | 816 /* load_options calls these functions after it parses global options, we have to call it here if it fails */ |
812 filter_add_defaults(); | 817 filter_add_defaults(); |
813 filter_rebuild(); | 818 filter_rebuild(); |
897 | 902 |
898 buf = g_build_filename(get_rc_dir(), ".command", NULL); | 903 buf = g_build_filename(get_rc_dir(), ".command", NULL); |
899 remote_connection = remote_server_init(buf, cd); | 904 remote_connection = remote_server_init(buf, cd); |
900 g_free(buf); | 905 g_free(buf); |
901 | 906 |
907 DEBUG_1("%s main: gtk_main", get_exec_time()); | |
902 gtk_main(); | 908 gtk_main(); |
903 #ifdef HAVE_GTHREAD | 909 #ifdef HAVE_GTHREAD |
904 gdk_threads_leave(); | 910 gdk_threads_leave(); |
905 #endif | 911 #endif |
906 return 0; | 912 return 0; |