Files
gnucash/src/import-export/import-settings.c

175 lines
5.9 KiB
C
Raw Normal View History

2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
/********************************************************************\
* 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@gnu.org *
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
\********************************************************************/
/** @addtogroup Import_Export
@{ */
/**@internal
@file import-settings.c
@brief User preference handling for
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
transaction matching (for both the gui and the backend)
@author Copyright (C) 2002 Benoit Grégoire
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
*/
#include "config.h"
#include <glib.h>
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
#include "import-settings.h"
#include "gnc-prefs.h"
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
/********************************************************************\
* Default values for user prefs (or values for unimplemented prefs.*
* If you modify the value of any of these, you must do the same in *
* generic-import.scm *
\********************************************************************/
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
static const int DEFAULT_ACTION_ADD_ENABLED = TRUE;
static const int DEFAULT_ACTION_CLEAR_ENABLED = TRUE;
/********************************************************************\
* Structures passed between the functions *
\********************************************************************/
struct _genimportsettings
{
gboolean action_skip_enabled;
gboolean action_update_enabled;
gboolean action_add_enabled;
gboolean action_clear_enabled;
/**Transaction who's best match probability is equal or higher than
this will reconcile their best match by default */
int clear_threshold;
/**Transaction who's best match probability is below or equal to
this will be added as new by default */
int add_threshold;
/**Transaction's match probability must be at least this much to be
2017-01-16 23:03:50 +01:00
displayed in the match list. Don't set this to 0 except for
debugging purposes, otherwise all transactions of every accounts
will be shown in the list */
int display_threshold;
/** The allowed amount range for fuzzy amount matching,
in the users default commodity.*/
double fuzzy_amount;
gint match_date_hardlimit;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
/************************************************************************
* Getter/Setter Functions for the Data Types.
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
************************************************************************/
/* Constructor */
GNCImportSettings *
gnc_import_Settings_new (void)
{
GNCImportSettings * settings;
settings = g_new0 ( GNCImportSettings, 1);
settings->action_skip_enabled =
gnc_prefs_get_bool (GNC_PREFS_GROUP_IMPORT, GNC_PREF_ENABLE_SKIP);
settings->action_update_enabled =
gnc_prefs_get_bool (GNC_PREFS_GROUP_IMPORT, GNC_PREF_ENABLE_UPDATE);
settings->action_add_enabled = DEFAULT_ACTION_ADD_ENABLED;
settings->action_clear_enabled = DEFAULT_ACTION_CLEAR_ENABLED;
settings->clear_threshold =
(int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_AUTO_CLEAR_THRESHOLD);
settings->add_threshold =
(int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_AUTO_ADD_THRESHOLD);
settings->display_threshold =
(int)gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_MATCH_THRESHOLD);
settings->fuzzy_amount =
gnc_prefs_get_float (GNC_PREFS_GROUP_IMPORT, GNC_PREF_ATM_FEE_THRESHOLD);
settings->match_date_hardlimit = 42; /* 6 weeks */
return settings;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
}
/* Destructor */
void gnc_import_Settings_delete (GNCImportSettings *settings)
{
if (settings)
{
g_free(settings);
}
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
}
double
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
gnc_import_Settings_get_fuzzy_amount (GNCImportSettings *settings)
{
g_assert (settings);
return settings->fuzzy_amount;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
gboolean gnc_import_Settings_get_action_skip_enabled (GNCImportSettings *settings)
{
g_assert (settings);
return settings->action_skip_enabled;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
gboolean gnc_import_Settings_get_action_add_enabled (GNCImportSettings *settings)
{
g_assert (settings);
return settings->action_add_enabled;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
gboolean gnc_import_Settings_get_action_update_enabled (GNCImportSettings *settings)
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
{
g_assert (settings);
return settings->action_update_enabled;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
gboolean gnc_import_Settings_get_action_clear_enabled (GNCImportSettings *settings)
{
g_assert (settings);
return settings->action_clear_enabled;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
gint gnc_import_Settings_get_clear_threshold (GNCImportSettings *settings)
{
g_assert (settings);
return settings->clear_threshold;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
gint gnc_import_Settings_get_add_threshold (GNCImportSettings *settings)
{
g_assert (settings);
return settings->add_threshold;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
gint gnc_import_Settings_get_display_threshold (GNCImportSettings *settings)
{
g_assert (settings);
return settings->display_threshold;
2002-12-6 Benoit Gr�goire <bock@step.polymtl.ca> Huge patch, this is the new generic import architecture/transaction matcher. Many old files were renamed, split or deleted. * src/engine/Transaction.c,h: - Add a DxaccSplitSetAmount function, - Fix a bug in xaccSplitsComputeValue (Split values were sometimes being summed, which is illogical) that caused xaccTransGetImbalance to sometimes return incorrect values. Somebody please review this. Playing in the engine during freeze isn't ideal. * src/import-export/import-backend.c,h: There is now a real backend, completely independent of the GUI. * src/import-export/gnc-gen-transaction.c: This is Christian's old matcher, I tried to maintain compatibility, but couldn't really test. Please note that there is some code simplification that could be done there now that there is a clean backend, and that some values passed between the functions might no longuer have any effect. * src/import-export/ofx/gnc-ofx-import.c: Update for new matcher. Use the currency reported by libofx and xaccSpiltSetBaseValue when adding a banking/credit card transaction. * src/import-export/import-account-matcher.c,h: This is a very generic and flexible account matcher/picker. * src/import-export/import-commodity-matcher.c,h: This is a generic commodity matcher/picker. * src/import-export/import-main-matcher.c,h: This is the main transaction matcher GUI. It's mostly feature complete and should be fairly stable, but probably leaks memory. * src/import-export/import-match-map.c,h: Derek Atkin's generic string/account matching infrastructure. * src/import-export/import-match-picker.c,h: This is the interface to pick a matching transaction. It has been completely ripped from the backend. * src/import-export/import-settings.c,h: All user settings (or compiled-in settings) are now abstracted in an opaque structure with getter functions. * src/import-export/import-utilities.c: These are utility functions to help import module writers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7632 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-12-07 00:34:28 +00:00
};
void gnc_import_Settings_set_match_date_hardlimit (GNCImportSettings *s, gint m)
{
g_assert(s);
s->match_date_hardlimit = m;
}
gint gnc_import_Settings_get_match_date_hardlimit (const GNCImportSettings *s)
{
g_assert(s);
return s->match_date_hardlimit;
}
/**@}*/