mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
parent
b256d36f44
commit
9ccfbe0f29
@ -59,9 +59,6 @@ gncLogLevel loglevel[MOD_NUM] =
|
|||||||
GNC_LOG_WARNING, /* QUERY */
|
GNC_LOG_WARNING, /* QUERY */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* xaccParseAmount configuration */
|
|
||||||
gncBoolean auto_decimal_enabled;
|
|
||||||
|
|
||||||
/* Set the logging level of the given module. */
|
/* Set the logging level of the given module. */
|
||||||
void
|
void
|
||||||
gnc_set_log_level(gncModuleType module, gncLogLevel level)
|
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.
|
/* prettify() cleans up subroutine names.
|
||||||
|
@ -152,6 +152,9 @@ void gnc_set_log_level(gncModuleType module, gncLogLevel level);
|
|||||||
/* Set the logging level for all modules. */
|
/* Set the logging level for all modules. */
|
||||||
void gnc_set_log_level_global(gncLogLevel level);
|
void gnc_set_log_level_global(gncLogLevel level);
|
||||||
|
|
||||||
|
/* enable/disable the auto decimal option */
|
||||||
|
void gnc_set_auto_decimal_enabled(gncBoolean enabled);
|
||||||
|
|
||||||
|
|
||||||
/********************************************************/
|
/********************************************************/
|
||||||
/* libc 'enhancements' */
|
/* libc 'enhancements' */
|
||||||
@ -263,9 +266,6 @@ char * xaccPrintAmountArgs (double val,
|
|||||||
/* Parse i18n amount strings */
|
/* Parse i18n amount strings */
|
||||||
double xaccParseAmount (const char * instr, gncBoolean monetary);
|
double xaccParseAmount (const char * instr, gncBoolean monetary);
|
||||||
|
|
||||||
/* Affects parsing of numerical amounts in xaccParseAmount */
|
|
||||||
extern gncBoolean auto_decimal_enabled;
|
|
||||||
|
|
||||||
|
|
||||||
/** TEMPLATES ******************************************************/
|
/** TEMPLATES ******************************************************/
|
||||||
/*
|
/*
|
||||||
|
@ -102,7 +102,6 @@ static SCM auto_decimal_callback_id = SCM_UNDEFINED;
|
|||||||
static SCM register_font_callback_id = SCM_UNDEFINED;
|
static SCM register_font_callback_id = SCM_UNDEFINED;
|
||||||
static SCM register_hint_font_callback_id = SCM_UNDEFINED;
|
static SCM register_hint_font_callback_id = SCM_UNDEFINED;
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================== */
|
/* ============================================================== */
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -782,7 +781,7 @@ gnc_configure_auto_decimal_cb(void *not_used)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* gnc_configure_auto_decimal
|
/* 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
|
* Args: Nothing
|
||||||
* Returns: Nothing
|
* Returns: Nothing
|
||||||
@ -790,10 +789,12 @@ gnc_configure_auto_decimal_cb(void *not_used)
|
|||||||
static void
|
static void
|
||||||
gnc_configure_auto_decimal(void)
|
gnc_configure_auto_decimal(void)
|
||||||
{
|
{
|
||||||
auto_decimal_enabled =
|
gnc_set_auto_decimal_enabled
|
||||||
(gncBoolean) gnc_lookup_boolean_option("General",
|
(
|
||||||
"Automatic Decimal Point",
|
(gncBoolean) gnc_lookup_boolean_option("General",
|
||||||
GNC_F);
|
"Automatic Decimal Point",
|
||||||
|
GNC_F)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* gnc_configure_register_font_cb
|
/* gnc_configure_register_font_cb
|
||||||
|
Loading…
Reference in New Issue
Block a user