[Gnucash-changes] Make locale-specific taxes depending on configure
switch.
Christian Stimming
cstim at cvs.gnucash.org
Sat Jan 29 08:00:26 EST 2005
Log Message:
-----------
Make locale-specific taxes depending on configure switch.
2005-01-29 Christian Stimming <stimming at tuhh.de>
* configure.in, src/tax/us/gncmod-tax-us.c,
src/report/locale-specific/us/gncmod-locale-reports-us.c,
src/app-utils/gnc-ui-util.c: Make localized tax categories
disabled by default; can be enabled by
--enable-locale-specific-tax switch.
Tags:
----
gnucash-1-8-branch
Modified Files:
--------------
gnucash:
ChangeLog
configure.in
gnucash/src/app-utils:
gnc-ui-util.c
gnucash/src/report/locale-specific/us:
gncmod-locale-reports-us.c
gnucash/src/tax/us:
gncmod-tax-us.c
Revision Data
-------------
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.358.2.45
retrieving revision 1.358.2.46
diff -Lconfigure.in -Lconfigure.in -u -r1.358.2.45 -r1.358.2.46
--- configure.in
+++ configure.in
@@ -589,6 +589,11 @@
dnl check for nl_langinfo(D_FMT) which is missing on FreeBSD
LANGINFO_D_FMT_CHECK
+dnl Enable locale-specific tax-related information in the accounts
+AC_ARG_ENABLE( locale-specific-tax,
+ [ --enable-locale-specific-tax enable localized tax categories (experimental)],
+ AC_DEFINE(LOCALE_SPECIFIC_TAX,1,Enable the experimental locale-specific tax categories) )
+
### --------------------------------------------------------------------------
### help files
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1461.2.388
retrieving revision 1.1461.2.389
diff -LChangeLog -LChangeLog -u -r1.1461.2.388 -r1.1461.2.389
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,11 @@
2005-01-29 Christian Stimming <stimming at tuhh.de>
+ * configure.in, src/tax/us/gncmod-tax-us.c,
+ src/report/locale-specific/us/gncmod-locale-reports-us.c,
+ src/app-utils/gnc-ui-util.c: Make localized tax categories
+ disabled by default; can be enabled by
+ --enable-locale-specific-tax switch.
+
* po/de.po: Update German translation.
* src/import-export/hbci/dialog-hbcitrans.c: Enable debit notes
Index: gncmod-locale-reports-us.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/locale-specific/us/gncmod-locale-reports-us.c,v
retrieving revision 1.7.2.3
retrieving revision 1.7.2.4
diff -Lsrc/report/locale-specific/us/gncmod-locale-reports-us.c -Lsrc/report/locale-specific/us/gncmod-locale-reports-us.c -u -r1.7.2.3 -r1.7.2.4
--- src/report/locale-specific/us/gncmod-locale-reports-us.c
+++ src/report/locale-specific/us/gncmod-locale-reports-us.c
@@ -47,11 +47,15 @@
int
libgncmod_locale_reports_us_LTX_gnc_module_init(int refcount) {
/* load the tax info */
+#ifdef LOCALE_SPECIFIC_TAX
const char *thislocale = setlocale(LC_ALL, NULL);
/* This is a very simple hack that loads the (new, special) German
tax definition file in a German locale, or (default) loads the
previous US tax file. */
gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0);
+#else
+ gboolean is_de_DE = FALSE;
+#endif /* LOCALE_SPECIFIC_TAX */
const char *tax_module = is_de_DE ?
"gnucash/tax/de_DE" :
"gnucash/tax/us";
Index: gnc-ui-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.c,v
retrieving revision 1.37.2.8
retrieving revision 1.37.2.9
diff -Lsrc/app-utils/gnc-ui-util.c -Lsrc/app-utils/gnc-ui-util.c -u -r1.37.2.8 -r1.37.2.9
--- src/app-utils/gnc-ui-util.c
+++ src/app-utils/gnc-ui-util.c
@@ -493,11 +493,15 @@
{
GNCModule module;
/* load the tax info */
+#ifdef LOCALE_SPECIFIC_TAX
const char *thislocale = setlocale(LC_ALL, NULL);
/* This is a very simple hack that loads the (new, special) German
tax definition file in a German locale, or (default) loads the
previous US tax file. */
gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0);
+#else
+ gboolean is_de_DE = FALSE;
+#endif /* LOCALE_SPECIFIC_TAX */
const char *tax_module = is_de_DE ?
"gnucash/tax/de_DE" :
"gnucash/tax/us";
Index: gncmod-tax-us.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/tax/us/gncmod-tax-us.c,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -Lsrc/tax/us/gncmod-tax-us.c -Lsrc/tax/us/gncmod-tax-us.c -u -r1.3.2.2 -r1.3.2.3
--- src/tax/us/gncmod-tax-us.c
+++ src/tax/us/gncmod-tax-us.c
@@ -32,10 +32,12 @@
char *
libgncmod_tax_us_LTX_gnc_module_path(void) {
+#ifdef LOCALE_SPECIFIC_TAX
const char *thislocale = setlocale(LC_ALL, NULL);
if (strncmp(thislocale, "de_DE", 5) == 0)
return g_strdup("gnucash/tax/de_DE");
else
+#endif
return g_strdup("gnucash/tax/us");
}
@@ -57,10 +59,12 @@
/* This is a very simple hack that loads the (new, special) German
tax definition file in a German locale, or (default) loads the
previous US tax file. */
+#ifdef LOCALE_SPECIFIC_TAX
const char *thislocale = setlocale(LC_ALL, NULL);
if (strncmp(thislocale, "de_DE", 5) == 0)
lmod("(gnucash tax de_DE)");
else
+#endif
lmod("(gnucash tax us)");
return TRUE;
}
More information about the gnucash-changes
mailing list