r14871 - gnucash/trunk - Remove mt940 module completely from the build and SVN because all of
Christian Stimming
cstim at cvs.gnucash.org
Tue Sep 19 14:44:58 EDT 2006
Author: cstim
Date: 2006-09-19 14:44:56 -0400 (Tue, 19 Sep 2006)
New Revision: 14871
Trac: http://svn.gnucash.org/trac/changeset/14871
Removed:
gnucash/trunk/src/import-export/mt940/Makefile.am
gnucash/trunk/src/import-export/mt940/gnc-mt940-import.c
gnucash/trunk/src/import-export/mt940/gnc-mt940-import.h
gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940-ui.xml
gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.c
gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.h
gnucash/trunk/src/import-export/mt940/gncmod-mt940-import.c
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/configure.in
gnucash/trunk/src/import-export/Makefile.am
Log:
Remove mt940 module completely from the build and SVN because all of
its functionality has been moved into the hbci (aqbanking) module.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/ChangeLog 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,3 +1,9 @@
+2006-09-19 Christian Stimming <stimming at tuhh.de>
+
+ * configure.in: Remove mt940 module completely from the build and
+ SVN because all of its functionality has been moved into the hbci
+ (aqbanking) module.
+
2006-09-19 Andreas Köhler <andi5.py at gmx.net>
* $some.glade: Use some more automatic scrollbars.
Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/configure.in 2006-09-19 18:44:56 UTC (rev 14871)
@@ -891,33 +891,11 @@
### --------------------------------------------------------------------------
### MT940
AC_ARG_ENABLE( mt940,
- [ --enable-mt940 compile with MT940 support (needs --enable-hbci)],
+ [ --enable-mt940 Obsolete, included in --enable-hbci],
if test "x$enableval" != "xno" ; then
- MT940_DIR=mt940 ;
- HBCI_DIR=hbci ;
+ AC_MSG_ERROR([--enable-mt940 is obsolete -- all functionality is already included in --enable-hbci])
fi)
-if test x${MT940_DIR} = xmt940 ;
-then
- AC_MSG_WARN([MT940 importing support is enabled but is totally experimental!])
- PKG_CHECK_MODULES(HBCI, aqbanking >= "1.3.0", [], [
- # aqbanking-1.6.0 was released on 2005-09-22
- AC_AQBANKING(1,6,0)
- if test x${have_aqbanking} != xyes;
- then
- AC_MSG_ERROR([Could not find aqbanking. If you use --enable-mt940, you *have* to enable aqbanking.])
- fi
- HBCI_LIBS="${aqbanking_libs}"
- HBCI_CFLAGS="${aqbanking_includes}"
- ])
- # Note: HBCI_LIBS is changed again below in the --enable-hbci
- # section. So check for mt940 first and *not* the other way round!
- AS_SCRUB_INCLUDE(HBCI_CFLAGS)
- AC_SUBST(HBCI_LIBS)
- AC_SUBST(HBCI_CFLAGS)
-fi
-AC_SUBST(MT940_DIR)
-
### --------------------------------------------------------------------------
### HBCI
AC_ARG_ENABLE( hbci,
@@ -2350,7 +2328,6 @@
src/import-export/schemas/Makefile
src/import-export/ofx/Makefile
src/import-export/ofx/test/Makefile
- src/import-export/mt940/Makefile
src/import-export/log-replay/Makefile
src/import-export/hbci/Makefile
src/import-export/hbci/glade/Makefile
@@ -2430,9 +2407,6 @@
if test x${HBCI_DIR} != x; then
components="$components hbci"
fi
-if test x${MT940_DIR} != x; then
-components="$components mt940"
-fi
AC_MSG_RESULT([
Options detected/selected
Modified: gnucash/trunk/src/import-export/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/Makefile.am 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/Makefile.am 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,7 +1,7 @@
SUBDIRS = . schemas qif qif-import \
- ${OFX_DIR} ${HBCI_DIR} ${MT940_DIR} log-replay test
+ ${OFX_DIR} ${HBCI_DIR} log-replay test
DIST_SUBDIRS = schemas qif qif-import qif-io-core \
- ofx hbci mt940 log-replay test
+ ofx hbci log-replay test
pkglib_LTLIBRARIES=libgncmod-generic-import.la
Deleted: gnucash/trunk/src/import-export/mt940/Makefile.am
===================================================================
--- gnucash/trunk/src/import-export/mt940/Makefile.am 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/mt940/Makefile.am 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,55 +0,0 @@
-SUBDIRS = .
-# test
-
-pkglib_LTLIBRARIES=libgncmod-mt940.la
-
-libgncmod_mt940_la_SOURCES = \
- gnc-mt940-import.c \
- gncmod-mt940-import.c \
- gnc-plugin-mt940.c
-
-noinst_HEADERS = \
- gnc-mt940-import.h \
- gnc-plugin-mt940.h
-
-libgncmod_mt940_la_LIBADD = \
- ${top_builddir}/src/import-export/hbci/libgncmod-hbci.la \
- ${top_builddir}/src/import-export/libgncmod-generic-import.la \
- ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
- ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
- ${top_builddir}/src/core-utils/libcore-utils.la \
- ${top_builddir}/src/gnc-module/libgncmodule.la \
- ${GNOME_LIBS} \
- ${GLADE_LIBS} \
- ${QOF_LIBS} \
- ${GLIB_LIBS} \
- ${HBCI_LIBS}
-
-AM_CFLAGS = \
- -I${top_srcdir}/src \
- -I${top_srcdir}/src/core-utils \
- -I${top_srcdir}/src/engine \
- -I${top_srcdir}/src/gnc-module \
- -I${top_srcdir}/src/app-utils \
- -I${top_srcdir}/src/gnome \
- -I${top_srcdir}/src/gnome-utils \
- -I${top_srcdir}/src/import-export \
- -I$(top_srcdir)/src/import-export/hbci \
- -I${top_srcdir}/src/register \
- -I${top_srcdir}/src/register/register-core \
- -I${top_srcdir}/src/register/register-gnome \
- -I${top_srcdir}/src/register/ledger-core \
- ${G_WRAP_COMPILE_ARGS} \
- ${GUILE_INCS} \
- ${GNOME_CFLAGS} \
- ${GTKHTML_CFLAGS} \
- ${GLADE_CFLAGS} \
- ${QOF_CFLAGS} \
- ${GLIB_CFLAGS} \
- ${HBCI_CFLAGS}
-
-uidir = $(GNC_UI_DIR)
-ui_DATA = \
- gnc-plugin-mt940-ui.xml
-
-EXTRA_DIST = $(ui_DATA)
Deleted: gnucash/trunk/src/import-export/mt940/gnc-mt940-import.c
===================================================================
--- gnucash/trunk/src/import-export/mt940/gnc-mt940-import.c 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/mt940/gnc-mt940-import.c 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,312 +0,0 @@
-/********************************************************************\
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
-\********************************************************************/
-/** @addtogroup Import_Export
- @{ */
-/** @internal
- @file gnc-mt940-import.c
- @brief MT940 import module code
- @author Copyright (c) 2002 Benoit Grégoire <bock at step.polymtl.ca>, Copyright (c) 2003 Jan-Pascal van Best <janpascal at vanbest.org>, Copyright (c) 2006 Florian Steinel, 2006 Christian Stimming.
- */
-#include "config.h"
-
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <fcntl.h>
-
-#include <aqbanking/version.h>
-#include <aqbanking/banking.h>
-#include <aqbanking/imexporter.h>
-
-#include "gnc-ui.h"
-#include "qof.h"
-#include "Transaction.h"
-#include "Account.h"
-
-#include "gnc-engine.h"
-#include "gnc-file.h"
-#include "gnc-ui-util.h"
-#include "gnc-gconf-utils.h"
-
-#include "gnc-hbci-gettrans.h"
-
-#include "import-main-matcher.h"
-#include "import-account-matcher.h"
-#include "gnc-hbci-gettrans.h"
-
-#include "gnc-mt940-import.h"
-
-#define GCONF_SECTION "dialogs/import/mt940"
-
-static QofLogModule log_module = GNC_MOD_IMPORT;
-
-/* Callback declarations */
-static const AB_TRANSACTION *
-translist_cb (const AB_TRANSACTION *element, void *user_data);
-static AB_IMEXPORTER_ACCOUNTINFO *
-accountinfolist_cb(AB_IMEXPORTER_ACCOUNTINFO *element, void *user_data);
-
-
-/* If aqbanking is older than 1.9.7, use our own copies of these
- foreach functions */
-#if ((AQBANKING_VERSION_MAJOR == 1) && \
- ((AQBANKING_VERSION_MINOR < 9) || \
- ((AQBANKING_VERSION_MINOR == 9) && \
- ((AQBANKING_VERSION_PATCHLEVEL < 7)))))
-static AB_IMEXPORTER_ACCOUNTINFO *
-AB_ImExporterContext_AccountInfoForEach(AB_IMEXPORTER_CONTEXT *iec,
- AB_IMEXPORTER_ACCOUNTINFO *
- (* func)(AB_IMEXPORTER_ACCOUNTINFO *element,
- void *user_data),
- void* user_data)
-{
- AB_IMEXPORTER_ACCOUNTINFO *it;
- AB_IMEXPORTER_ACCOUNTINFO *retval;
- g_assert(iec);
-
- it = AB_ImExporterContext_GetFirstAccountInfo (iec);
- while (it) {
- retval = func(it, user_data);
- if (retval) {
- return retval;
- }
- it = AB_ImExporterContext_GetNextAccountInfo (iec);
- }
- return 0;
-
-}
-static const AB_TRANSACTION *
-AB_ImExporterAccountInfo_TransactionsForEach(AB_IMEXPORTER_ACCOUNTINFO *iea,
- const AB_TRANSACTION *
- (* func)(const AB_TRANSACTION *element,
- void *user_data),
- void* user_data)
-{
- const AB_TRANSACTION *it;
- const AB_TRANSACTION *retval;
- g_assert(iea);
-
- it = AB_ImExporterAccountInfo_GetFirstTransaction (iea);
- while (it) {
- retval = func(it, user_data);
- if (retval) {
- return retval;
- }
- it = AB_ImExporterAccountInfo_GetNextTransaction (iea);
- }
- return 0;
-}
-#endif /* aqbanking < 1.9.7 */
-
-
-/* Note: The importing here is not yet tested with actual files, see
- http://bugzilla.gnome.org/show_bug.cgi?id=325170 . */
-
-/* See aqbanking-1.6.0beta/src/tools/aqbanking-tool/import.c for hints
- on how to program aqbanking. */
-
-/********************************************************************\
- * gnc_file_mt940_import
- * Entry point
-\********************************************************************/
-
-void gnc_file_mt940_import (const gchar *aqbanking_importername,
- const gchar *aqbanking_profilename)
-{
- char *selected_filename;
- char *default_dir;
- int mt940_fd;
-
- /* qof_log_check(MOD_IMPORT, QOF_LOG_TRACE); */
- DEBUG("gnc_file_mt940_import(): Begin...\n");
-
- default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
- if (default_dir == NULL)
- gnc_init_default_directory(&default_dir);
- selected_filename = gnc_file_dialog(_("Select an MT940 file to process"),
- NULL,
- default_dir,
- GNC_FILE_DIALOG_IMPORT);
- g_free(default_dir);
-
- if(selected_filename!=NULL) {
- /* Remember the directory as the default. */
- default_dir = g_path_get_dirname(selected_filename);
- gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
- g_free(default_dir);
-
- /*strncpy(file,selected_filename, 255);*/
- DEBUG("Filename found: %s",selected_filename);
-
- DEBUG("Opening selected file");
- mt940_fd = open(selected_filename, O_RDONLY);
- if (mt940_fd == -1) {
- DEBUG("Could not open file %s", selected_filename);
- return;
- }
-
- {
- int result;
- AB_BANKING *ab;
- AB_IMEXPORTER *importer;
- AB_IMEXPORTER_CONTEXT *ctx=0;
- GWEN_BUFFEREDIO *buffio;
- GWEN_DB_NODE *dbProfiles;
- GWEN_DB_NODE *dbProfile;
- const char *importerName = aqbanking_importername;
- const char *profileName = aqbanking_profilename; /* "swift-mt940"; */
- /* Possible values for profile: "swiftmt942", but for other
- importers: "default" */
-
- ab = AB_Banking_new("gnucash", 0);
- AB_Banking_Init(ab);
-
- /* get import module */
- importer=AB_Banking_GetImExporter(ab, importerName);
- if (!importer) {
- DEBUG("Import module %s not found", importerName);
- gnc_error_dialog(NULL, "%s",("Import module for MT940 import not found."));
- return;
- }
- g_assert(importer);
-
- /* load the import profile */
- dbProfiles=AB_Banking_GetImExporterProfiles(ab, importerName);
-
- /* select profile */
- dbProfile=GWEN_DB_GetFirstGroup(dbProfiles);
- while(dbProfile) {
- const char *name;
-
- name=GWEN_DB_GetCharValue(dbProfile, "name", 0, 0);
- g_assert(name);
- if (strcasecmp(name, profileName)==0)
- break;
- dbProfile=GWEN_DB_GetNextGroup(dbProfile);
- }
- if (!dbProfile) {
- DEBUG("Profile \"%s\" for importer \"%s\" not found",
- profileName, importerName);
- printf("Profile \"%s\" for importer \"%s\" not found\n",
- profileName, importerName);
- /* For debugging: Print those available names that have been found. */
- dbProfile=GWEN_DB_GetFirstGroup(dbProfiles);
- while(dbProfile) {
- const char *name;
- name=GWEN_DB_GetCharValue(dbProfile, "name", 0, 0);
- g_assert(name);
- printf("Only found profile \"%s\"\n", name);
- dbProfile=GWEN_DB_GetNextGroup(dbProfile);
- }
- return;
- }
- g_assert(dbProfile);
-
- /* import new context */
- ctx=AB_ImExporterContext_new();
- g_assert(ctx);
-
- /* Wrap file in gwen_bufferedio */
- buffio = GWEN_BufferedIO_File_new(mt940_fd);
- g_assert(buffio);
- GWEN_BufferedIO_SetReadBuffer(buffio, 0, 1024);
-
- result = AB_ImExporter_Import(importer,
- ctx,
- buffio,
- dbProfile);
-
- DEBUG("Parsing result: %d\n", result);
-
- GWEN_BufferedIO_Close(buffio);
- GWEN_BufferedIO_free(buffio);
- GWEN_DB_Group_free(dbProfiles);
-
- {
- /* Now get all accountinfos */
- struct trans_list_data data;
- GNCImportMainMatcher *importer_generic_gui;
- GtkWidget *parent = NULL;
-
- /* Create importer GUI */
- importer_generic_gui = gnc_gen_trans_list_new(parent, NULL, TRUE, 14);
- data.importer_generic = importer_generic_gui;
-
- /* Iterate through all accounts */
- AB_ImExporterContext_AccountInfoForEach(ctx, accountinfolist_cb, &data);
- /* all accounts finished. */
-
- AB_ImExporterContext_free(ctx);
-
- /* that's it */
- result=AB_Banking_Fini(ab);
- if (result)
- DEBUG("ERROR: Error on deinit (%d)\n",result);
-
- g_free(selected_filename);
- AB_Banking_free(ab);
-
-
- /* and run the gnucash importer. */
- gnc_gen_trans_list_run (importer_generic_gui);
- }
- }
- }
-}
-
-static AB_IMEXPORTER_ACCOUNTINFO *
-accountinfolist_cb(AB_IMEXPORTER_ACCOUNTINFO *accinfo, void *user_data) {
- Account *gnc_acc;
- struct trans_list_data *data = user_data;
- const char *bank_code =
- AB_ImExporterAccountInfo_GetBankCode(accinfo);
- const char *account_number =
- AB_ImExporterAccountInfo_GetAccountNumber(accinfo);
- const char *account_name =
- AB_ImExporterAccountInfo_GetAccountName(accinfo);
- gchar *online_id = g_strconcat (bank_code, account_number, NULL);
-
- gnc_acc = gnc_import_select_account(NULL,
- online_id, 1, account_name, NULL,
- ACCT_TYPE_NONE, NULL, NULL);
- g_free(online_id);
- if (gnc_acc) {
- /* Store chosen gnucash account in callback data */
- data->gnc_acc = gnc_acc;
-
- /* Iterate through all transactions. */
- AB_ImExporterAccountInfo_TransactionsForEach (accinfo, translist_cb, data);
- /* all transactions finished. */
- }
- return NULL;
-}
-
-static const AB_TRANSACTION *
-translist_cb (const AB_TRANSACTION *element, void *user_data) {
- /* This callback in the hbci module will add the imported
- transaction to gnucash's importer. */
- /* The call will use "element" only as const* */
- gnc_hbci_trans_list_cb( (AB_TRANSACTION*) element, user_data);
- return NULL;
-}
-
-
-/** @} */
Deleted: gnucash/trunk/src/import-export/mt940/gnc-mt940-import.h
===================================================================
--- gnucash/trunk/src/import-export/mt940/gnc-mt940-import.h 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/mt940/gnc-mt940-import.h 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,46 +0,0 @@
-/********************************************************************\
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
-\********************************************************************/
- /** @file
- @brief mt940 import module interface
- *
- gnc-mt940-import.h
- @author Copyright (c) 2002 Benoit Grégoire <bock at step.polymtl.ca>
- */
-#ifndef MT940_IMPORT_H
-#define MT940_IMPORT_H
-
-/** The gnc_file_mt940_import() routine will pop up a standard file
- * selection dialogue asking the user to pick an MT940 file. If one
- * is selected then the MT940 file is opened and read. Its contents
- * are merged into the existing session (if any). The current
- * session continues to remain open for editing.
- *
- * @param aqbanking_importername The aqbanking importer module that
- * should be used. Possible values: "dtaus", "csv", "swift".
- *
- * @param aqbanking_profilename In aqbanking, each importer has one or
- * more "profiles" that define the actual data fields that should be
- * used. Possible values for swift: "swift-mt940" or "swift-mt942",
- * but for all others: "default", or more precisely: Look into
- * $datadir/aqbanking/imexporters and look into the "name" field of
- * the foo.conf files.
- */
-void gnc_file_mt940_import (const gchar *aqbanking_importername,
- const gchar *aqbanking_profilename);
-#endif
Deleted: gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940-ui.xml
===================================================================
--- gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940-ui.xml 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940-ui.xml 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,10 +0,0 @@
-<ui>
- <menubar>
- <menu name="File" action="FileAction">
- <menu name="FileImport" action="FileImportAction">
- <placeholder name="FileImportPlaceholder">
- </placeholder>
- </menu>
- </menu>
- </menubar>
-</ui>
Deleted: gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.c
===================================================================
--- gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.c 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.c 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,162 +0,0 @@
-/*
- * gnc-plugin-mt940.c --
- * Copyright (C) 2003 David Hampton <hampton at employees.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, contact:
- *
- * Free Software Foundation Voice: +1-617-542-5942
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
- * Boston, MA 02110-1301, USA gnu at gnu.org
- */
-
-#include "config.h"
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-
-#include "gnc-engine.h"
-#include "gnc-plugin-manager.h"
-#include "gnc-plugin-mt940.h"
-#include "gnc-mt940-import.h"
-#include "gnc-plugin-page-account-tree.h"
-#include "gnc-plugin-page-register.h"
-
-static void gnc_plugin_mt940_class_init (GncPluginMt940Class *klass);
-static void gnc_plugin_mt940_init (GncPluginMt940 *plugin);
-static void gnc_plugin_mt940_finalize (GObject *object);
-
-/* Command callbacks */
-/* static void gnc_plugin_mt940_cmd_import (GtkAction *action, GncMainWindowActionData *data); */
-
-
-#define PLUGIN_ACTIONS_NAME "gnc-plugin-mt940-actions"
-#define PLUGIN_UI_FILENAME "gnc-plugin-mt940-ui.xml"
-
-static GtkActionEntry gnc_plugin_actions [] = {
- /* { "Mt940ImportAction", GTK_STOCK_CONVERT, N_("Import MT940"), NULL,
- N_("Process an MT940 response file"),
- G_CALLBACK (gnc_plugin_mt940_cmd_import) }, */
-};
-static guint gnc_plugin_n_actions = G_N_ELEMENTS (gnc_plugin_actions);
-
-typedef struct GncPluginMt940Private
-{
- gpointer dummy;
-} GncPluginMt940Private;
-
-#define GNC_PLUGIN_MT940_GET_PRIVATE(o) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN_MT940, GncPluginMt940Private))
-
-static GObjectClass *parent_class = NULL;
-
-GType
-gnc_plugin_mt940_get_type (void)
-{
- static GType gnc_plugin_mt940_type = 0;
-
- if (gnc_plugin_mt940_type == 0) {
- static const GTypeInfo our_info = {
- sizeof (GncPluginMt940Class),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) gnc_plugin_mt940_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GncPluginMt940),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gnc_plugin_mt940_init,
- };
-
- gnc_plugin_mt940_type = g_type_register_static (GNC_TYPE_PLUGIN,
- "GncPluginMt940",
- &our_info, 0);
- }
-
- return gnc_plugin_mt940_type;
-}
-
-GncPlugin *
-gnc_plugin_mt940_new (void)
-{
- return GNC_PLUGIN (g_object_new (GNC_TYPE_PLUGIN_MT940, NULL));
-}
-
-static void
-gnc_plugin_mt940_class_init (GncPluginMt940Class *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GncPluginClass *plugin_class = GNC_PLUGIN_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = gnc_plugin_mt940_finalize;
-
- /* plugin info */
- plugin_class->plugin_name = GNC_PLUGIN_MT940_NAME;
-
- /* widget addition/removal */
- plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
- plugin_class->actions = gnc_plugin_actions;
- plugin_class->n_actions = gnc_plugin_n_actions;
- plugin_class->ui_filename = PLUGIN_UI_FILENAME;
-
- g_type_class_add_private(klass, sizeof(GncPluginMt940Private));
-}
-
-static void
-gnc_plugin_mt940_init (GncPluginMt940 *plugin)
-{
-}
-
-static void
-gnc_plugin_mt940_finalize (GObject *object)
-{
- GncPluginMt940 *plugin;
- GncPluginMt940Private *priv;
-
- g_return_if_fail (GNC_IS_PLUGIN_MT940 (object));
-
- plugin = GNC_PLUGIN_MT940 (object);
- priv = GNC_PLUGIN_MT940_GET_PRIVATE(plugin);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/************************************************************
- * Plugin Function Implementation *
- ************************************************************/
-
-/************************************************************
- * Command Callbacks *
- ************************************************************/
-/*
-static void
-gnc_plugin_mt940_cmd_import (GtkAction *action,
- GncMainWindowActionData *data)
-{
- gnc_file_mt940_import ("swift", "swift-mt940");
-}
-*/
-
-/************************************************************
- * Plugin Bootstrapping *
- ************************************************************/
-
-void
-gnc_plugin_mt940_create_plugin (void)
-{
- GncPlugin *plugin = gnc_plugin_mt940_new ();
-
- gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), plugin);
-}
Deleted: gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.h
===================================================================
--- gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.h 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/mt940/gnc-plugin-mt940.h 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,60 +0,0 @@
-/*
- * gnc-plugin-mt940.h --
- * Copyright (C) 2003 David Hampton <hampton at employees.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, contact:
- *
- * Free Software Foundation Voice: +1-617-542-5942
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652
- * Boston, MA 02110-1301, USA gnu at gnu.org
- */
-
-#ifndef __GNC_PLUGIN_MT940_H
-#define __GNC_PLUGIN_MT940_H
-
-#include <gtk/gtkwindow.h>
-
-#include "gnc-plugin.h"
-
-G_BEGIN_DECLS
-
-/* type macros */
-#define GNC_TYPE_PLUGIN_MT940 (gnc_plugin_mt940_get_type ())
-#define GNC_PLUGIN_MT940(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_MT940, GncPluginMt940))
-#define GNC_PLUGIN_MT940_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_MT940, GncPluginMt940Class))
-#define GNC_IS_PLUGIN_MT940(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_MT940))
-#define GNC_IS_PLUGIN_MT940_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_MT940))
-#define GNC_PLUGIN_MT940_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_MT940, GncPluginMt940Class))
-
-#define GNC_PLUGIN_MT940_NAME "gnc-plugin-mt940"
-
-/* typedefs & structures */
-typedef struct {
- GncPlugin gnc_plugin;
-} GncPluginMt940;
-
-typedef struct {
- GncPluginClass gnc_plugin;
-} GncPluginMt940Class;
-
-/* function prototypes */
-GType gnc_plugin_mt940_get_type (void);
-
-GncPlugin *gnc_plugin_mt940_new (void);
-
-void gnc_plugin_mt940_create_plugin (void);
-
-G_END_DECLS
-
-#endif /* __GNC_PLUGIN_MT940_H */
Deleted: gnucash/trunk/src/import-export/mt940/gncmod-mt940-import.c
===================================================================
--- gnucash/trunk/src/import-export/mt940/gncmod-mt940-import.c 2006-09-19 11:00:06 UTC (rev 14870)
+++ gnucash/trunk/src/import-export/mt940/gncmod-mt940-import.c 2006-09-19 18:44:56 UTC (rev 14871)
@@ -1,96 +0,0 @@
-/********************************************************************\
- * This program is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU General Public License as *
- * published by the Free Software Foundation; either version 2 of *
- * the License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact: *
- * *
- * Free Software Foundation Voice: +1-617-542-5942 *
- * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
- * Boston, MA 02110-1301, USA gnu at gnu.org *
-\********************************************************************/
-/** @addtogroup Import_Export
- @{ */
- /**@internal
- @file gncmod-mt940-import.c
- @brief module definition/initialization for the mt940 importer
- @author Copyright (c) 2002 Benoit Grégoire bock at step.polymtl.ca
- */
-#include "config.h"
-#include <glib.h>
-
-#include <gtk/gtk.h>
-#include <stdio.h>
-#include <libguile.h>
-
-#include "gnc-module.h"
-#include "gnc-module-api.h"
-
-#include "gnc-mt940-import.h"
-#include "gnc-plugin-mt940.h"
-
-/* version of the gnc module system interface we require */
-int libgncmod_mt940_LTX_gnc_module_system_interface = 0;
-
-/* module versioning uses libtool semantics. */
-int libgncmod_mt940_LTX_gnc_module_current = 0;
-int libgncmod_mt940_LTX_gnc_module_revision = 0;
-int libgncmod_mt940_LTX_gnc_module_age = 0;
-
-//static GNCModule bus_core;
-//static GNCModule file;
-
-/* forward references */
-char *libgncmod_mt940_LTX_gnc_module_path(void);
-char *libgncmod_mt940_LTX_gnc_module_description(void);
-int libgncmod_mt940_LTX_gnc_module_init(int refcount);
-int libgncmod_mt940_LTX_gnc_module_end(int refcount);
-
-
-char *
-libgncmod_mt940_LTX_gnc_module_path(void)
-{
- return g_strdup("gnucash/import-export/mt940");
-}
-char *
-libgncmod_mt940_LTX_gnc_module_description(void)
-{
- return g_strdup("Gnome GUI and C code for MT940 importer");
-}
-int
-libgncmod_mt940_LTX_gnc_module_init(int refcount)
-{
- if(!gnc_module_load("gnucash/engine", 0))
- {
- return FALSE;
- }
- if(!gnc_module_load("gnucash/app-utils", 0))
- {
- return FALSE;
- }
- if(!gnc_module_load("gnucash/gnome-utils", 0))
- {
- return FALSE;
- }
- if(!gnc_module_load("gnucash/import-export", 0))
- {
- return FALSE;
- }
-
- gnc_plugin_mt940_create_plugin();
- return TRUE;
-}
-
-int
-libgncmod_mt940_LTX_gnc_module_end(int refcount)
-{
- return TRUE;
-}
-/** @}*/
More information about the gnucash-changes
mailing list