mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Link gnome-utils against backend/file and remove symbol lookup in
druid-gnc-xml-import.c. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14300 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d769b6b4ee
commit
8ef848f7f8
@ -1,5 +1,10 @@
|
||||
2006-06-03 Andreas Köhler <andi5.py@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.
|
||||
|
||||
|
@ -181,9 +181,6 @@ typedef struct {
|
||||
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 @@ typedef gint (*find_ambiguous_handler)(
|
||||
*/
|
||||
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__ */
|
||||
|
@ -180,6 +180,7 @@ libgncmod_gnome_utils_la_LIBADD = \
|
||||
${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 \
|
||||
|
@ -249,29 +249,6 @@ static system_encoding_type system_encodings [] =
|
||||
};
|
||||
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 @@ gnc_xml_convert_single_file (const gchar *filename)
|
||||
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_check_file (GncXmlImportData *data)
|
||||
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 @@ gxi_parse_file (GncXmlImportData *data)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user