[Gnucash-changes] r14300 - gnucash/trunk - Link gnome-utils against
backend/file and remove symbol lookup in
Andreas Köhler
andi5 at cvs.gnucash.org
Sat Jun 3 04:59:52 EDT 2006
Author: andi5
Date: 2006-06-03 04:59:51 -0400 (Sat, 03 Jun 2006)
New Revision: 14300
Trac: http://svn.gnucash.org/trac/changeset/14300
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/backend/file/io-gncxml-v2.h
gnucash/trunk/src/gnome-utils/Makefile.am
gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c
Log:
Link gnome-utils against backend/file and remove symbol lookup in
druid-gnc-xml-import.c.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-06-03 08:27:01 UTC (rev 14299)
+++ gnucash/trunk/ChangeLog 2006-06-03 08:59:51 UTC (rev 14300)
@@ -1,5 +1,10 @@
2006-06-03 Andreas Köhler <andi5.py at gmx.net>
+ * src/gnome-utils/Makefile.am:
+ * src/gnome-utils/druid-gnc-xml-import.c:
+ * src/backend/file/io-gncxml-v2.h: Link gnome-utils against
+ backend/file and remove symbol lookup in druid-gnc-xml-import.c.
+
* src/register/register-gnome/gnucash-sheet.c: Add GDK_Menu as
shortcut for showing register popups. Fixes 343244.
Modified: gnucash/trunk/src/backend/file/io-gncxml-v2.h
===================================================================
--- gnucash/trunk/src/backend/file/io-gncxml-v2.h 2006-06-03 08:27:01 UTC (rev 14299)
+++ gnucash/trunk/src/backend/file/io-gncxml-v2.h 2006-06-03 08:59:51 UTC (rev 14300)
@@ -181,9 +181,6 @@
gint gnc_xml2_find_ambiguous(
const gchar *filename, GList *encodings, GHashTable **unique,
GHashTable **ambiguous, GList **impossible);
-typedef gint (*find_ambiguous_handler)(
- const gchar *filename, GList *encodings, GHashTable **unique,
- GHashTable **ambiguous, GList **impossible);
/** Parse a file in push mode, but replace byte sequences in the file given a
* hash table of substitutions
@@ -192,7 +189,5 @@
*/
gboolean gnc_xml2_parse_with_subst (
FileBackend *fbe, QofBook *book, GHashTable *subst);
-typedef gboolean (*parse_with_subst_handler)(
- FileBackend *fbe, QofBook *book, GHashTable *subst);
#endif /* __IO_GNCXML_V2_H__ */
Modified: gnucash/trunk/src/gnome-utils/Makefile.am
===================================================================
--- gnucash/trunk/src/gnome-utils/Makefile.am 2006-06-03 08:27:01 UTC (rev 14299)
+++ gnucash/trunk/src/gnome-utils/Makefile.am 2006-06-03 08:59:51 UTC (rev 14300)
@@ -180,6 +180,7 @@
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/engine/libgw-engine.la \
+ ${top_builddir}/src/backend/file/libgnc-backend-file-utils.la \
${top_builddir}/src/calculation/libgncmod-calculation.la \
${top_builddir}/src/network-utils/libgncmod-network-utils.la \
${top_builddir}/src/app-utils/libgncmod-app-utils.la \
Modified: gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c
===================================================================
--- gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c 2006-06-03 08:27:01 UTC (rev 14299)
+++ gnucash/trunk/src/gnome-utils/druid-gnc-xml-import.c 2006-06-03 08:59:51 UTC (rev 14300)
@@ -249,29 +249,6 @@
};
static guint n_system_encodings = G_N_ELEMENTS (system_encodings);
-static find_ambiguous_handler find_ambiguous = NULL;
-static parse_with_subst_handler parse_with_subst = NULL;
-static GModule *allsymbols = NULL;
-
-static gboolean
-gxi_find_backend_symbols ()
-{
- gpointer symbol;
-
- if (!allsymbols)
- allsymbols = g_module_open (NULL, 0);
-
- if (!g_module_symbol (allsymbols, "gnc_xml2_find_ambiguous", &symbol))
- return FALSE;
- find_ambiguous = symbol;
-
- if (!g_module_symbol (allsymbols, "gnc_xml2_parse_with_subst", &symbol))
- return FALSE;
- parse_with_subst = symbol;
-
- return TRUE;
-}
-
gboolean
gnc_xml_convert_single_file (const gchar *filename)
{
@@ -280,8 +257,6 @@
GladeXML *xml;
gboolean success;
- g_return_val_if_fail (gxi_find_backend_symbols (), FALSE);
-
data = g_new0 (GncXmlImportData, 1);
data->import_type = XML_CONVERT_SINGLE_FILE;
data->filename = g_strdup (filename);
@@ -627,7 +602,7 @@
gxi_ambiguous_info_destroy (data);
/* analyze file */
- data->n_impossible = (*find_ambiguous) (
+ data->n_impossible = gnc_xml2_find_ambiguous (
data->filename, data->encodings, &data->unique, &data->ambiguous_ht, NULL);
if (data->n_impossible != -1) {
@@ -742,7 +717,7 @@
backend = (FileBackend*) qof_book_get_backend (book);
gxi_update_progress_bar (_("Parsing file..."), 0.0);
- success = (*parse_with_subst) (backend, book, data->subst);
+ success = gnc_xml2_parse_with_subst (backend, book, data->subst);
gxi_update_progress_bar (NULL, -1.0);
if (success)
More information about the gnucash-changes
mailing list