40 static const int DEFAULT_ACTION_ADD_ENABLED = TRUE;
41 static const int DEFAULT_ACTION_CLEAR_ENABLED = TRUE;
50 gboolean action_skip_enabled;
51 gboolean action_update_enabled;
52 gboolean action_add_enabled;
53 gboolean action_clear_enabled;
73 gint match_date_hardlimit;
84 GNCImportSettings * settings;
86 settings = g_new0 ( GNCImportSettings, 1);
89 settings->action_skip_enabled =
91 settings->action_update_enabled =
93 settings->action_add_enabled = DEFAULT_ACTION_ADD_ENABLED;
94 settings->action_clear_enabled = DEFAULT_ACTION_CLEAR_ENABLED;
95 settings->clear_threshold =
97 settings->add_threshold =
99 settings->display_threshold =
101 settings->date_threshold =
103 settings->date_not_threshold =
105 settings->fuzzy_amount =
108 settings->match_date_hardlimit = 42;
125 return settings->fuzzy_amount;
131 return settings->action_skip_enabled;
137 return settings->action_add_enabled;
143 return settings->action_update_enabled;
149 return settings->action_clear_enabled;
155 return settings->clear_threshold;
161 return settings->add_threshold;
167 return settings->display_threshold;
170 gint gnc_import_Settings_get_date_threshold (GNCImportSettings *settings)
173 return settings->date_threshold;
176 gint gnc_import_Settings_get_date_not_threshold (GNCImportSettings *settings)
179 return settings->date_not_threshold;
185 s->match_date_hardlimit = m;
191 return s->match_date_hardlimit;
int display_threshold
Transaction's match probability must be at least this much to be displayed in the match list...
gint gnc_import_Settings_get_clear_threshold(GNCImportSettings *settings)
Return the selected threshold.
GNCImportSettings * gnc_import_Settings_new(void)
Allocates a new GNCImportSettings object, and initialize it with the appropriate user prefs...
gboolean gnc_import_Settings_get_action_add_enabled(GNCImportSettings *settings)
Return the selected action is enable state.
gint gnc_import_Settings_get_display_threshold(GNCImportSettings *settings)
Return the selected threshold.
int add_threshold
Transaction who's best match probability is below or equal to this will be added as new by default...
void gnc_import_Settings_delete(GNCImportSettings *settings)
Destructor.
#define GNC_PREFS_GROUP_IMPORT
The preferences used by the importer.
gint gnc_import_Settings_get_match_date_hardlimit(const GNCImportSettings *s)
Returns the hard-limiting number of days that a matching split may differ.
Import preference handling.
gboolean gnc_import_Settings_get_action_clear_enabled(GNCImportSettings *settings)
Return the selected action is enable state.
int date_not_threshold
Transaction who's date is outside threshold is an unlikely match.
void gnc_import_Settings_set_match_date_hardlimit(GNCImportSettings *s, gint m)
double gnc_import_Settings_get_fuzzy_amount(GNCImportSettings *settings)
Return the allowed amount range for fuzzy amount matching.
int clear_threshold
Transaction who's best match probability is equal or higher than this will reconcile their best match...
Generic api to store and retrieve preferences.
gboolean gnc_import_Settings_get_action_update_enabled(GNCImportSettings *settings)
Return the selected action is enable state.
int date_threshold
Transaction who's date is within threshold is likely match.
gboolean gnc_prefs_get_bool(const gchar *group, const gchar *pref_name)
Get a boolean value from the preferences backend.
double fuzzy_amount
The allowed amount range for fuzzy amount matching, in the users default commodity.
gboolean gnc_import_Settings_get_action_skip_enabled(GNCImportSettings *settings)
Return the selected action is enable state.
gint gnc_import_Settings_get_add_threshold(GNCImportSettings *settings)
Return the selected threshold.
gdouble gnc_prefs_get_float(const gchar *group, const gchar *pref_name)
Get an float value from the preferences backend.