|
GnuCash 2.4.99
|
00001 /********************************************************************* 00002 * gncmod-report-gnome.c 00003 * module definition/initialization for the gnome report infrastructure 00004 * 00005 * Copyright (c) 2001 Linux Developers Group, Inc. 00006 *********************************************************************/ 00007 00008 #ifdef HAVE_CONFIG_H 00009 #include <config.h> 00010 #endif 00011 00012 #include <gmodule.h> 00013 #include <gtk/gtk.h> 00014 #include <libguile.h> 00015 00016 #include "gnc-module.h" 00017 #include "gnc-module-api.h" 00018 00019 #include "window-report.h" 00020 00021 GNC_MODULE_API_DECL(libgncmod_report_gnome) 00022 00023 /* version of the gnc module system interface we require */ 00024 int libgncmod_report_gnome_gnc_module_system_interface = 0; 00025 00026 /* module versioning uses libtool semantics. */ 00027 int libgncmod_report_gnome_gnc_module_current = 0; 00028 int libgncmod_report_gnome_gnc_module_revision = 0; 00029 int libgncmod_report_gnome_gnc_module_age = 0; 00030 00031 00032 char * 00033 libgncmod_report_gnome_gnc_module_path(void) 00034 { 00035 return g_strdup("gnucash/report/report-gnome"); 00036 } 00037 00038 char * 00039 libgncmod_report_gnome_gnc_module_description(void) 00040 { 00041 return g_strdup("Gnome component of GnuCash report generation system"); 00042 } 00043 00044 static void 00045 lmod(char * mn) 00046 { 00047 char * form = g_strdup_printf("(use-modules %s)\n", mn); 00048 scm_c_eval_string(form); 00049 g_free(form); 00050 } 00051 extern SCM scm_init_sw_report_gnome_module(void); 00052 00053 int 00054 libgncmod_report_gnome_gnc_module_init(int refcount) 00055 { 00056 if (!gnc_module_load("gnucash/app-utils", 0)) 00057 { 00058 return FALSE; 00059 } 00060 00061 if (!gnc_module_load("gnucash/gnome-utils", 0)) 00062 { 00063 return FALSE; 00064 } 00065 00066 if (!gnc_module_load("gnucash/report/report-system", 0)) 00067 { 00068 return FALSE; 00069 } 00070 scm_init_sw_report_gnome_module(); 00071 00072 lmod ("(sw_report_gnome)"); 00073 lmod ("(gnucash report report-gnome)"); 00074 00075 if (refcount == 0) 00076 gnc_report_init (); 00077 00078 return TRUE; 00079 } 00080 00081 int 00082 libgncmod_report_gnome_gnc_module_end(int refcount) 00083 { 00084 return TRUE; 00085 }
1.7.4