r22828 - gnucash/trunk/src/bin - Again reorder the initialization in gnucash-bin: gtk_init_check must be called before gnc_module_system_init.
Christian Stimming
cstim at code.gnucash.org
Fri Mar 22 17:39:37 EDT 2013
Author: cstim
Date: 2013-03-22 17:39:37 -0400 (Fri, 22 Mar 2013)
New Revision: 22828
Trac: http://svn.gnucash.org/trac/changeset/22828
Modified:
gnucash/trunk/src/bin/gnucash-bin.c
Log:
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).
Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c 2013-03-11 18:08:08 UTC (rev 22827)
+++ gnucash/trunk/src/bin/gnucash-bin.c 2013-03-22 21:39:37 UTC (rev 22828)
@@ -859,6 +859,19 @@
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 @@
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 */
More information about the gnucash-changes
mailing list