Kevin Finn's auto-decimal patch.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2530 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-06-30 06:12:37 +00:00
parent b256d36f44
commit 9ccfbe0f29
3 changed files with 21 additions and 12 deletions

View File

@ -59,9 +59,6 @@ gncLogLevel loglevel[MOD_NUM] =
GNC_LOG_WARNING, /* QUERY */
};
/* xaccParseAmount configuration */
gncBoolean auto_decimal_enabled;
/* Set the logging level of the given module. */
void
gnc_set_log_level(gncModuleType module, gncLogLevel level)
@ -83,6 +80,17 @@ gnc_set_log_level_global(gncLogLevel level)
}
/* xaccParseAmount configuration */
static gncBoolean auto_decimal_enabled = GNC_F;
/* enable/disable the auto_decimal_enabled option */
void
gnc_set_auto_decimal_enabled(gncBoolean enabled)
{
auto_decimal_enabled = enabled;
}
/********************************************************************\
\********************************************************************/
/* prettify() cleans up subroutine names.

View File

@ -152,6 +152,9 @@ void gnc_set_log_level(gncModuleType module, gncLogLevel level);
/* Set the logging level for all modules. */
void gnc_set_log_level_global(gncLogLevel level);
/* enable/disable the auto decimal option */
void gnc_set_auto_decimal_enabled(gncBoolean enabled);
/********************************************************/
/* libc 'enhancements' */
@ -263,9 +266,6 @@ char * xaccPrintAmountArgs (double val,
/* Parse i18n amount strings */
double xaccParseAmount (const char * instr, gncBoolean monetary);
/* Affects parsing of numerical amounts in xaccParseAmount */
extern gncBoolean auto_decimal_enabled;
/** TEMPLATES ******************************************************/
/*

View File

@ -102,7 +102,6 @@ static SCM auto_decimal_callback_id = SCM_UNDEFINED;
static SCM register_font_callback_id = SCM_UNDEFINED;
static SCM register_hint_font_callback_id = SCM_UNDEFINED;
/* ============================================================== */
int
@ -782,7 +781,7 @@ gnc_configure_auto_decimal_cb(void *not_used)
}
/* gnc_configure_auto_decimal
* Setup the global value of the auto decimal field.
* Pass the global value for the auto decimal field to the engine.
*
* Args: Nothing
* Returns: Nothing
@ -790,10 +789,12 @@ gnc_configure_auto_decimal_cb(void *not_used)
static void
gnc_configure_auto_decimal(void)
{
auto_decimal_enabled =
(gncBoolean) gnc_lookup_boolean_option("General",
"Automatic Decimal Point",
GNC_F);
gnc_set_auto_decimal_enabled
(
(gncBoolean) gnc_lookup_boolean_option("General",
"Automatic Decimal Point",
GNC_F)
);
}
/* gnc_configure_register_font_cb