GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gncmod-register-gnome.c
1 /*********************************************************************
2  * gncmod-register-gnome.c
3  * module definition/initialization for Gnome parts of register
4  *
5  * Copyright (c) 2001 Linux Developers Group, Inc.
6  *********************************************************************/
7 
8 #include "config.h"
9 
10 #include <gmodule.h>
11 
12 #include "combocell.h"
13 #include "datecell.h"
14 #include "gnc-module-api.h"
15 #include "gnc-module.h"
16 #include "formulacell-gnome.h"
17 #include "pricecell-gnome.h"
18 #include "quickfillcell-gnome.h"
19 #include "register-common.h"
20 #include "table-gnome.h"
21 
22 GNC_MODULE_API_DECL(libgncmod_register_gnome)
23 
24 /* version of the gnc module system interface we require */
25 int libgncmod_register_gnome_gnc_module_system_interface = 0;
26 
27 /* module versioning uses libtool semantics. */
28 int libgncmod_register_gnome_gnc_module_current = 0;
29 int libgncmod_register_gnome_gnc_module_revision = 0;
30 int libgncmod_register_gnome_gnc_module_age = 0;
31 
32 
33 char *
34 libgncmod_register_gnome_gnc_module_path(void)
35 {
36  return g_strdup("gnucash/register/register-gnome");
37 }
38 
39 char *
40 libgncmod_register_gnome_gnc_module_description(void)
41 {
42  return g_strdup("Gnome GUI for ledger-like table displays");
43 }
44 
45 int
46 libgncmod_register_gnome_gnc_module_init(int refcount)
47 {
48  if (!gnc_module_load("gnucash/register/register-core", 0))
49  {
50  return FALSE;
51  }
52 
53  if (!gnc_module_load("gnucash/gnome-utils", 0))
54  {
55  return FALSE;
56  }
57 
58  if (refcount == 0)
59  {
60  gnc_register_add_cell_type (COMBO_CELL_TYPE_NAME, gnc_combo_cell_new);
61 
62  gnc_register_add_cell_type (DATE_CELL_TYPE_NAME, gnc_date_cell_new);
63 
64  gnc_register_add_cell_type (PRICE_CELL_TYPE_NAME,
65  gnc_price_cell_gnome_new);
66 
67  gnc_register_add_cell_type (QUICKFILL_CELL_TYPE_NAME,
68  gnc_quickfill_cell_gnome_new);
69 
70  gnc_register_add_cell_type( FORMULA_CELL_TYPE_NAME,
71  gnc_formula_cell_gnome_new );
72 
73  gnc_table_gnome_init ();
74  }
75 
76  return TRUE;
77 }
The ComboCell object implements a cell handler with a "combination-box" pull-down menu in it...
Common declarations for the register core.