GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncmod-stylesheets.c
1 /*********************************************************************
2  * gncmod-stylesheets.c
3  * module definition/initialization for the standard reports
4  *
5  * Copyright (c) 2001 Linux Developers Group, Inc.
6  *********************************************************************/
7 
8 #include "config.h"
9 
10 #include <gmodule.h>
11 #include <libguile.h>
12 
13 #include "gnc-module.h"
14 #include "gnc-module-api.h"
15 #include "gnc-plugin-stylesheets.h"
16 
17 GNC_MODULE_API_DECL(libgncmod_stylesheets)
18 
19 /* version of the gnc module system interface we require */
20 int libgncmod_stylesheets_gnc_module_system_interface = 0;
21 
22 /* module versioning uses libtool semantics. */
23 int libgncmod_stylesheets_gnc_module_current = 0;
24 int libgncmod_stylesheets_gnc_module_revision = 0;
25 int libgncmod_stylesheets_gnc_module_age = 0;
26 
27 
28 char *
29 libgncmod_stylesheets_gnc_module_path(void)
30 {
31  return g_strdup("gnucash/report/stylesheets");
32 }
33 
34 char *
35 libgncmod_stylesheets_gnc_module_description(void)
36 {
37  return g_strdup("Standard report stylesheet definitions");
38 }
39 
40 int
41 libgncmod_stylesheets_gnc_module_init(int refcount)
42 {
43  /* load the report system */
44  if (!gnc_module_load("gnucash/report/report-system", 0))
45  {
46  return FALSE;
47  }
48 
49  /* load the report generation scheme code */
50  if (scm_c_eval_string("(use-modules (gnucash report stylesheets))") ==
51  SCM_BOOL_F)
52  {
53  return FALSE;
54  }
55 
56  /* Add menu items with C callbacks */
57  gnc_plugin_stylesheets_create_plugin();
58 
59  return TRUE;
60 }
61 
62 int
63 libgncmod_stylesheets_gnc_module_end(int refcount)
64 {
65  return TRUE;
66 }