* 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
This commit is contained in:
Dave Peticolas 2001-12-20 11:00:58 +00:00
parent 3ddf61ef35
commit aa5229d387

View File

@ -14,6 +14,8 @@
#include "gnc-module.h" #include "gnc-module.h"
#include "gnc-module-api.h" #include "gnc-module-api.h"
#include "gnc-component-manager.h"
/* version of the gnc module system interface we require */ /* version of the gnc module system interface we require */
int gnc_module_system_interface = 0; int gnc_module_system_interface = 0;
@ -41,7 +43,8 @@ lmod(char * mn)
} }
int int
gnc_module_init(int refcount) { gnc_module_init(int refcount)
{
/* load the engine (we depend on it) */ /* load the engine (we depend on it) */
if(!gnc_module_load("gnucash/engine", 0)) { if(!gnc_module_load("gnucash/engine", 0)) {
return FALSE; return FALSE;
@ -57,10 +60,17 @@ gnc_module_init(int refcount) {
lmod("(g-wrapped gw-app-utils)"); lmod("(g-wrapped gw-app-utils)");
lmod("(gnucash app-utils)"); lmod("(gnucash app-utils)");
if (refcount == 0)
gnc_component_manager_init ();
return TRUE; return TRUE;
} }
int int
gnc_module_end(int refcount) { gnc_module_end(int refcount)
{
if (refcount == 0)
gnc_component_manager_shutdown ();
return TRUE; return TRUE;
} }