Again reorder the initialization in gnucash-bin: gtk_init_check must be called before gnc_module_system_init.

This commit reverts parts of r22399, because the gtk_init after
module_system_init caused some messed-up locale settings in dependent
modules (in particular, the aqbanking module).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22828 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2013-03-22 21:39:37 +00:00
parent c29d40a8be
commit ab0879d034

View File

@ -859,6 +859,19 @@ main(int argc, char ** argv)
gnc_print_unstable_message();
gnc_log_init();
/* We need to initialize gtk before looking up all modules */
gnc_gtk_add_rc_file ();
if(!gtk_init_check (&argc, &argv))
{
g_printerr(_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
_("Error: could not initialize graphical user interface and option add-price-quotes was not set."),
argv[0]);
return 1;
}
/* Now the module files are looked up, which might cause some library
initialization to be run, hence gtk must be initialized beforehand. */
gnc_module_system_init();
/* If asked via a command line parameter, fetch quotes only */
@ -868,15 +881,6 @@ main(int argc, char ** argv)
exit(0); /* never reached */
}
/* No quotes fetching was asked - attempt to initialize the gui */
gnc_gtk_add_rc_file ();
if(!gtk_init_check (&argc, &argv))
{
g_printerr(_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
_("Error: could not initialize graphical user interface and option add-price-quotes was not set."),
argv[0]);
return 1;
}
gnc_gui_init();
scm_boot_guile(argc, argv, inner_main, 0);
exit(0); /* never reached */