From f6d5fe5a442348c9631e0214048d2037834f4779 Mon Sep 17 00:00:00 2001 From: Mike Gorse Date: Tue, 2 May 2023 16:56:04 -0500 Subject: Replace ATK_LOCALEDIR with ATSPI_LOCALEDIR This will allow the locale directory to be available outside of atk. --- atk/atkprivate.c | 10 +++++----- atk/meson.build | 1 - meson.build | 2 ++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/atk/atkprivate.c b/atk/atkprivate.c index 9242e14d..be41c470 100644 --- a/atk/atkprivate.c +++ b/atk/atkprivate.c @@ -63,10 +63,10 @@ get_atk_locale_dir (void) const gchar *p; gchar *root, *temp; - /* ATK_LOCALEDIR might end in either /lib/locale or + /* ATSPI_LOCALEDIR might end in either /lib/locale or * /share/locale. Scan for that slash. */ - p = ATK_LOCALEDIR + strlen (ATK_LOCALEDIR); + p = ATSPI_LOCALEDIR + strlen (ATSPI_LOCALEDIR); while (*--p != '/') ; while (*--p != '/') @@ -85,9 +85,9 @@ get_atk_locale_dir (void) return atk_localedir; } -#undef ATK_LOCALEDIR +#undef ATSPI_LOCALEDIR -#define ATK_LOCALEDIR get_atk_locale_dir () +#define ATSPI_LOCALEDIR get_atk_locale_dir () #endif @@ -103,7 +103,7 @@ _gettext_initialization (void) gettext_initialized = TRUE; if (dir == NULL) - dir = ATK_LOCALEDIR; + dir = ATSPI_LOCALEDIR; bindtextdomain (GETTEXT_PACKAGE, dir); #ifdef HAVE_BIND_TEXTDOMAIN_CODESET diff --git a/atk/meson.build b/atk/meson.build index d216b680..a2a543bf 100644 --- a/atk/meson.build +++ b/atk/meson.build @@ -111,7 +111,6 @@ atk_cflags = [ '-DGLIB_DISABLE_DEPRECATION_WARNINGS', '-DATK_DISABLE_DEPRECATION_WARNINGS', '-DATK_COMPILATION', - '-DATK_LOCALEDIR="@0@"'.format(join_paths(atspi_datadir, 'locale')), ] if host_system == 'windows' diff --git a/meson.build b/meson.build index 84d872d7..bd5b8878 100644 --- a/meson.build +++ b/meson.build @@ -119,6 +119,8 @@ else systemd_user_dir = join_paths(get_option('prefix'), 'lib/systemd/user') endif +at_spi_conf.set_quoted('ATSPI_LOCALEDIR', join_paths(atspi_datadir, 'locale')) + # Dependencies libdbus_req_version = '>= 1.5' glib_req_version = '>= 2.67.4' -- cgit v1.2.1