load the qsf backend from the right place.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14205 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2006-05-26 15:41:38 +00:00
parent 844fe5f7ad
commit 177b31b397
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2006-05-26 Derek Atkins <derek@ihtfp.com>
* src/engine/gnc-engine.c: load the qsf backend from the right place.
2006-05-26 Christian Stimming <stimming@tuhh.de> 2006-05-26 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/druid-hbci-initial.c: Simplify calling * src/import-export/hbci/druid-hbci-initial.c: Simplify calling

View File

@ -75,10 +75,15 @@ gnucash_micro_version (void)
void void
gnc_engine_init(int argc, char ** argv) gnc_engine_init(int argc, char ** argv)
{ {
static gchar *names[] = { static struct {
QSF_BACKEND_LIB, GNC_LIB_NAME, "gnc-backend-postgres", const gchar* dir;
NULL}; const gchar* lib;
gchar **np; } libs[] = {
{ QOF_LIB_DIR, QSF_BACKEND_LIB },
{ GNC_LIBDIR, GNC_LIB_NAME },
/* shouldn't the PG gnc-module do this instead of US doing it? */
{ GNC_LIBDIR, "gnc-backend-postgres" },
{ NULL, NULL } }, *lib;
gnc_engine_init_hook_t hook; gnc_engine_init_hook_t hook;
GList * cur; GList * cur;
@ -98,9 +103,11 @@ gnc_engine_init(int argc, char ** argv)
/* Now register our core types */ /* Now register our core types */
cashobjects_register(); cashobjects_register();
for (np = names; *np; np++) { for (lib = libs; lib->dir && lib->lib ; lib++) {
if (qof_load_backend_library(GNC_LIBDIR, *np)) if (qof_load_backend_library(lib->dir, lib->lib))
engine_is_initialized = 1; engine_is_initialized = 1;
else
g_message("failed to load %s from %s", lib->lib, lib->dir);
} }
/* call any engine hooks */ /* call any engine hooks */