From aa5229d387688b97cbf5e28fa986d7799d2789a0 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Thu, 20 Dec 2001 11:00:58 +0000 Subject: [PATCH] * src/app-utils/gncmod-app-utils.c: perform component manager initialization and shutdown here git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6398 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/app-utils/gncmod-app-utils.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app-utils/gncmod-app-utils.c b/src/app-utils/gncmod-app-utils.c index 4ea09f6032..113878e734 100644 --- a/src/app-utils/gncmod-app-utils.c +++ b/src/app-utils/gncmod-app-utils.c @@ -14,6 +14,8 @@ #include "gnc-module.h" #include "gnc-module-api.h" +#include "gnc-component-manager.h" + /* version of the gnc module system interface we require */ int gnc_module_system_interface = 0; @@ -41,7 +43,8 @@ lmod(char * mn) } int -gnc_module_init(int refcount) { +gnc_module_init(int refcount) +{ /* load the engine (we depend on it) */ if(!gnc_module_load("gnucash/engine", 0)) { return FALSE; @@ -57,10 +60,17 @@ gnc_module_init(int refcount) { lmod("(g-wrapped gw-app-utils)"); lmod("(gnucash app-utils)"); + if (refcount == 0) + gnc_component_manager_init (); + return TRUE; } int -gnc_module_end(int refcount) { +gnc_module_end(int refcount) +{ + if (refcount == 0) + gnc_component_manager_shutdown (); + return TRUE; }