[Gnucash-changes] Make experimental locale-specific taxes depending on configure switch.

Christian Stimming cstim at cvs.gnucash.org
Sat Jan 29 07:54:34 EST 2005


Log Message:
-----------
Make experimental 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.

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.400
retrieving revision 1.401
diff -Lconfigure.in -Lconfigure.in -u -r1.400 -r1.401
--- configure.in
+++ configure.in
@@ -656,6 +656,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.1881
retrieving revision 1.1882
diff -LChangeLog -LChangeLog -u -r1.1881 -r1.1882
--- 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.
+
 	* src/import-export/hbci/dialog-hbcitrans.c: Enable debit notes
 	again. Various other improvements.
 
Index: gnc-ui-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -Lsrc/app-utils/gnc-ui-util.c -Lsrc/app-utils/gnc-ui-util.c -u -r1.49 -r1.50
--- src/app-utils/gnc-ui-util.c
+++ src/app-utils/gnc-ui-util.c
@@ -448,11 +448,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-locale-reports-us.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/locale-specific/us/gncmod-locale-reports-us.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/report/locale-specific/us/gncmod-locale-reports-us.c -Lsrc/report/locale-specific/us/gncmod-locale-reports-us.c -u -r1.11 -r1.12
--- src/report/locale-specific/us/gncmod-locale-reports-us.c
+++ src/report/locale-specific/us/gncmod-locale-reports-us.c
@@ -48,11 +48,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: gncmod-tax-us.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/tax/us/gncmod-tax-us.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/tax/us/gncmod-tax-us.c -Lsrc/tax/us/gncmod-tax-us.c -u -r1.6 -r1.7
--- src/tax/us/gncmod-tax-us.c
+++ src/tax/us/gncmod-tax-us.c
@@ -33,10 +33,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");
 }
 
@@ -58,10 +60,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