GnuCash 2.4.99
gncmod-generic-import.c
00001 
00007 #include "config.h"
00008 #include <gmodule.h>
00009 #include <libguile.h>
00010 #include <glib/gi18n.h>
00011 
00012 #include "dialog-preferences.h"
00013 
00014 #include "gnc-module.h"
00015 #include "gnc-module-api.h"
00016 
00017 GNC_MODULE_API_DECL(libgncmod_generic_import)
00018 
00019 /* version of the gnc module system interface we require */
00020 int libgncmod_generic_import_gnc_module_system_interface = 0;
00021 
00022 /* module versioning uses libtool semantics. */
00023 int libgncmod_generic_import_gnc_module_current  = 0;
00024 int libgncmod_generic_import_gnc_module_revision = 0;
00025 int libgncmod_generic_import_gnc_module_age      = 0;
00026 
00027 /*static GNCModule engine; NOTUSED */
00028 
00029 char *
00030 libgncmod_generic_import_gnc_module_path(void)
00031 {
00032     return g_strdup("gnucash/import-export");
00033 }
00034 
00035 char *
00036 libgncmod_generic_import_gnc_module_description(void)
00037 {
00038     return g_strdup("Gnome GUI and C code for the generic import functions");
00039 }
00040 
00041 int
00042 libgncmod_generic_import_gnc_module_init(int refcount)
00043 {
00044     if (!gnc_module_load("gnucash/engine", 0))
00045     {
00046         return FALSE;
00047     }
00048     if (!gnc_module_load("gnucash/app-utils", 0))
00049     {
00050         return FALSE;
00051     }
00052     if (!gnc_module_load("gnucash/gnome-utils", 0))
00053     {
00054         return FALSE;
00055     }
00056 
00057     if (!refcount)
00058     {
00059         /* Add to preferences under Online Banking */
00060         /* The parameters are; glade file, items to add from glade file - last being the dialog, preference tab name */
00061         gnc_preferences_add_to_page("dialog-import.glade", "atm_fee_adj,auto_add_adj,auto_clear_adj,match_adj,matcher_prefs",
00062                                     _("Online Banking"));
00063     }
00064 
00065     return TRUE;
00066 }
00067 
00068 int
00069 libgncmod_generic_import_gnc_module_end(int refcount)
00070 {
00071     return TRUE;
00072 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines