From 540cca4e7aa2e8144db0a5a4ef9c62103f0fa7e0 Mon Sep 17 00:00:00 2001 From: Chris Shoemaker Date: Thu, 19 Jan 2006 17:58:02 +0000 Subject: [PATCH] Add hooks just once in app_utils module init. Also don't try to load imaginary module. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12899 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/app-utils/gncmod-app-utils.c | 8 ++++---- src/bin/gnucash-bin.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app-utils/gncmod-app-utils.c b/src/app-utils/gncmod-app-utils.c index 0e56a42be4..1820c07f94 100644 --- a/src/app-utils/gncmod-app-utils.c +++ b/src/app-utils/gncmod-app-utils.c @@ -75,11 +75,11 @@ libgncmod_app_utils_LTX_gnc_module_init(int refcount) lmod("(g-wrapped gw-app-utils)"); lmod("(gnucash app-utils)"); - gnc_hook_add_dangler(HOOK_STARTUP, (GFunc)gnc_exp_parser_init, NULL); - gnc_hook_add_dangler(HOOK_SHUTDOWN, (GFunc)app_utils_shutdown, NULL); - - if (refcount == 0) + if (refcount == 0) { gnc_component_manager_init (); + gnc_hook_add_dangler(HOOK_STARTUP, (GFunc)gnc_exp_parser_init, NULL); + gnc_hook_add_dangler(HOOK_SHUTDOWN, (GFunc)app_utils_shutdown, NULL); + } return TRUE; } diff --git a/src/bin/gnucash-bin.c b/src/bin/gnucash-bin.c index 3fe3e48196..bd9ee31fd2 100644 --- a/src/bin/gnucash-bin.c +++ b/src/bin/gnucash-bin.c @@ -161,7 +161,6 @@ inner_main (void *closure, int argc, char **argv) /* module initializations go here */ gnc_module_load("gnucash/app-utils", 0); - gnc_module_load("gnucash/gw-engine", 0); gnc_module_load("gnucash/engine", 0); gnc_module_load("gnucash/register/ledger-core", 0); gnc_module_load("gnucash/register/register-core", 0);