GnuCash 2.4.99
gncmod-register-gnome.c
00001 /*********************************************************************
00002  * gncmod-register-gnome.c
00003  * module definition/initialization for Gnome parts of register
00004  *
00005  * Copyright (c) 2001 Linux Developers Group, Inc.
00006  *********************************************************************/
00007 
00008 #include "config.h"
00009 
00010 #include <gmodule.h>
00011 
00012 #include "combocell.h"
00013 #include "datecell.h"
00014 #include "gnc-module-api.h"
00015 #include "gnc-module.h"
00016 #include "formulacell-gnome.h"
00017 #include "pricecell-gnome.h"
00018 #include "quickfillcell-gnome.h"
00019 #include "register-common.h"
00020 #include "table-gnome.h"
00021 
00022 GNC_MODULE_API_DECL(libgncmod_register_gnome)
00023 
00024 /* version of the gnc module system interface we require */
00025 int libgncmod_register_gnome_gnc_module_system_interface = 0;
00026 
00027 /* module versioning uses libtool semantics. */
00028 int libgncmod_register_gnome_gnc_module_current  = 0;
00029 int libgncmod_register_gnome_gnc_module_revision = 0;
00030 int libgncmod_register_gnome_gnc_module_age      = 0;
00031 
00032 
00033 char *
00034 libgncmod_register_gnome_gnc_module_path(void)
00035 {
00036     return g_strdup("gnucash/register/register-gnome");
00037 }
00038 
00039 char *
00040 libgncmod_register_gnome_gnc_module_description(void)
00041 {
00042     return g_strdup("Gnome GUI for ledger-like table displays");
00043 }
00044 
00045 int
00046 libgncmod_register_gnome_gnc_module_init(int refcount)
00047 {
00048     if (!gnc_module_load("gnucash/register/register-core", 0))
00049     {
00050         return FALSE;
00051     }
00052 
00053     if (!gnc_module_load("gnucash/gnome-utils", 0))
00054     {
00055         return FALSE;
00056     }
00057 
00058     if (refcount == 0)
00059     {
00060         gnc_register_add_cell_type (COMBO_CELL_TYPE_NAME, gnc_combo_cell_new);
00061 
00062         gnc_register_add_cell_type (DATE_CELL_TYPE_NAME, gnc_date_cell_new);
00063 
00064         gnc_register_add_cell_type (PRICE_CELL_TYPE_NAME,
00065                                     gnc_price_cell_gnome_new);
00066 
00067         gnc_register_add_cell_type (QUICKFILL_CELL_TYPE_NAME,
00068                                     gnc_quickfill_cell_gnome_new);
00069 
00070         gnc_register_add_cell_type( FORMULA_CELL_TYPE_NAME,
00071                                     gnc_formula_cell_gnome_new );
00072 
00073         gnc_table_gnome_init ();
00074     }
00075 
00076     return TRUE;
00077 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines