|
GnuCash 2.4.99
|
00001 /********************************************************************* 00002 * gncmod-gnome-search 00003 * GNC Module initialization for the Gnome Search UI 00004 * 00005 * Copyright (c) 2002 Derek Atkins <warlord@MIT.EDU> 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License as 00009 * published by the Free Software Foundation; either version 2 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, contact: 00019 * 00020 * Free Software Foundation Voice: +1-617-542-5942 00021 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 00022 * Boston, MA 02110-1301, USA gnu@gnu.org 00023 *********************************************************************/ 00024 00025 #ifdef HAVE_CONFIG_H 00026 #include <config.h> 00027 #endif 00028 00029 #include <gtk/gtk.h> 00030 #include <gmodule.h> 00031 #include <libguile.h> 00032 00033 #include "gnc-module.h" 00034 #include "gnc-module-api.h" 00035 00036 #include "search-core-type.h" 00037 00038 GNC_MODULE_API_DECL(libgncmod_gnome_search) 00039 00040 /* version of the gnc module system interface we require */ 00041 int libgncmod_gnome_search_gnc_module_system_interface = 0; 00042 00043 /* module versioning uses libtool semantics. */ 00044 int libgncmod_gnome_search_gnc_module_current = 0; 00045 int libgncmod_gnome_search_gnc_module_revision = 0; 00046 int libgncmod_gnome_search_gnc_module_age = 0; 00047 00048 00049 char * 00050 libgncmod_gnome_search_gnc_module_path(void) 00051 { 00052 return g_strdup("gnucash/gnome-search"); 00053 } 00054 00055 char * 00056 libgncmod_gnome_search_gnc_module_description(void) 00057 { 00058 return g_strdup("The GnuCash Gnome Search UI"); 00059 } 00060 00061 int 00062 libgncmod_gnome_search_gnc_module_init(int refcount) 00063 { 00064 /* load the engine (we depend on it) */ 00065 if (!gnc_module_load("gnucash/engine", 0)) 00066 { 00067 return FALSE; 00068 } 00069 00070 if (!gnc_module_load("gnucash/gnome-utils", 0)) 00071 { 00072 return FALSE; 00073 } 00074 00075 if (refcount == 0) 00076 { 00077 /* initialize known types */ 00078 gnc_search_core_initialize (); 00079 } 00080 00081 return TRUE; 00082 } 00083 00084 int 00085 libgncmod_gnome_search_gnc_module_end(int refcount) 00086 { 00087 /* XXX Unload the other modules */ 00088 00089 if (refcount == 0) 00090 { 00091 /* Shutdown */ 00092 gnc_search_core_finalize (); 00093 } 00094 00095 return TRUE; 00096 }
1.7.4