From b83be1b8c604fd4b93510aa79228d7dcaa50de60 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 20 Oct 2017 20:50:33 +0200 Subject: [PATCH] Remove configure option --enable-locale-specific-tax and make gnucash always behave as if it was set --- common/config.h.cmake.in | 3 --- configure.ac | 9 --------- .../report/locale-specific/us/gncmod-locale-reports-us.c | 8 +------- libgnucash/app-utils/gnc-ui-util.c | 6 +----- libgnucash/tax/us/gncmod-tax-us.c | 9 +-------- 5 files changed, 3 insertions(+), 32 deletions(-) diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in index 71d2e9c44d..fe6ecc9226 100644 --- a/common/config.h.cmake.in +++ b/common/config.h.cmake.in @@ -280,9 +280,6 @@ /* Define to 1 if you have the file `/usr/src/gtest/src/gtest-all.cc'. */ #cmakedefine HAVE__USR_SRC_GTEST_SRC_GTEST_ALL_CC 1 -/* Enable the experimental locale-specific tax categories */ -#cmakedefine LOCALE_SPECIFIC_TAX 1 - /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" diff --git a/configure.ac b/configure.ac index fd23a64861..fcf0a37885 100644 --- a/configure.ac +++ b/configure.ac @@ -1120,15 +1120,6 @@ fi 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, - [AS_HELP_STRING([--enable-locale-specific-tax],[enable localized tax categories (experimental, but used by the german SKR04 account chart)])], - [ - if test x$enableval = xyes; then - AC_DEFINE(LOCALE_SPECIFIC_TAX,1,Enable the experimental locale-specific tax categories) - fi - ]) - dnl Make sure we have a proper gettext installed AC_MSG_CHECKING(for a valid gettext/gmsgfmt installation) if test "$gt_cv_have_gettext" != "yes" || test "x$GMSGFMT" = "x"; then diff --git a/gnucash/report/locale-specific/us/gncmod-locale-reports-us.c b/gnucash/report/locale-specific/us/gncmod-locale-reports-us.c index 9e3208cfff..933f18aff1 100644 --- a/gnucash/report/locale-specific/us/gncmod-locale-reports-us.c +++ b/gnucash/report/locale-specific/us/gncmod-locale-reports-us.c @@ -26,10 +26,8 @@ #include "config.h" -#ifdef LOCALE_SPECIFIC_TAX #include #include -#endif // LOCALE_SPECIFIC_TAX #include #include @@ -68,10 +66,9 @@ libgncmod_locale_reports_us_gnc_module_init(int refcount) { const gchar *tax_module, *report_taxtxf, *report_locale; /* load the tax info */ -#ifdef LOCALE_SPECIFIC_TAX /* 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. */ + US tax file. */ # ifdef G_OS_WIN32 gchar *thislocale = g_win32_getlocale(); gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0); @@ -80,9 +77,6 @@ libgncmod_locale_reports_us_gnc_module_init(int refcount) const char *thislocale = setlocale(LC_ALL, NULL); gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0); # endif /* G_OS_WIN32 */ -#else /* !LOCALE_SPECIFIC_TAX */ - gboolean is_de_DE = FALSE; -#endif /* LOCALE_SPECIFIC_TAX */ if (is_de_DE) { tax_module = "gnucash/tax/de_DE"; diff --git a/libgnucash/app-utils/gnc-ui-util.c b/libgnucash/app-utils/gnc-ui-util.c index 739465d812..dcfd424e41 100644 --- a/libgnucash/app-utils/gnc-ui-util.c +++ b/libgnucash/app-utils/gnc-ui-util.c @@ -493,10 +493,9 @@ gnc_ui_account_get_tax_info_string (const Account *account) GNCModule module; const gchar *tax_module; /* load the tax info */ -#ifdef LOCALE_SPECIFIC_TAX /* 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. */ + US tax file. */ # ifdef G_OS_WIN32 gchar *thislocale = g_win32_getlocale(); gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0); @@ -505,9 +504,6 @@ gnc_ui_account_get_tax_info_string (const Account *account) const char *thislocale = setlocale(LC_ALL, NULL); gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0); # endif /* G_OS_WIN32 */ -#else /* LOCALE_SPECIFIC_TAX */ - gboolean is_de_DE = FALSE; -#endif /* LOCALE_SPECIFIC_TAX */ tax_module = is_de_DE ? "gnucash/tax/de_DE" : "gnucash/tax/us"; diff --git a/libgnucash/tax/us/gncmod-tax-us.c b/libgnucash/tax/us/gncmod-tax-us.c index 6b1b9f0740..d0ce30dcbd 100644 --- a/libgnucash/tax/us/gncmod-tax-us.c +++ b/libgnucash/tax/us/gncmod-tax-us.c @@ -26,10 +26,8 @@ #include "config.h" -#ifdef LOCALE_SPECIFIC_TAX #include #include -#endif // LOCALE_SPECIFIC_TAX #include #include @@ -50,7 +48,6 @@ int libgncmod_tax_us_gnc_module_age = 0; char * libgncmod_tax_us_gnc_module_path(void) { -#ifdef LOCALE_SPECIFIC_TAX # ifdef G_OS_WIN32 gchar *thislocale = g_win32_getlocale(); gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0); @@ -63,8 +60,6 @@ libgncmod_tax_us_gnc_module_path(void) return g_strdup("gnucash/tax/de_DE"); else return g_strdup("gnucash/tax/us"); -#endif /* LOCALE_SPECIFIC_TAX */ - return g_strdup("gnucash/tax/us"); } char * @@ -86,8 +81,7 @@ libgncmod_tax_us_gnc_module_init(int refcount) { /* 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 + US tax file. */ # ifdef G_OS_WIN32 gchar *thislocale = g_win32_getlocale(); gboolean is_de_DE = (strncmp(thislocale, "de_DE", 5) == 0); @@ -99,7 +93,6 @@ libgncmod_tax_us_gnc_module_init(int refcount) if (is_de_DE) lmod("(gnucash tax de_DE)"); else -#endif /* LOCALE_SPECIFIC_TAX */ lmod("(gnucash tax us)"); return TRUE; }