From 611a6dd08cf24cd2c07294909e14435a4d9dbafe Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 13 Jun 2003 20:54:41 +0000 Subject: Set gettext_initialized. 2003-06-13 Tor Lillqvist * atk/atkobject.c (atk_role_get_localized_name): Set gettext_initialized. * atk-zip.sh.in (DEVZIP): libtool 1.5 installs DLLs in the bin directory, so look there, too. Include the message catalogs. Merge from HEAD: * Makefile.am (EXTRA_DIST): Dist atk-zip.sh.in, not atk-zip.sh. * atk/atk.def: Add missing entries, thanks to Cedric Gustin. * atk/atk.rc.in: New file, for version info in the DLL on Windows. Similar as in GLib, GTK, etc. * configure.in: Expand atk/atk.rc. * atk/Makefile.am: Use atk.rc on Windows. (EXTRA_DIST): Distribute atk.rc.in. * atk/atkobject.c: On Windows, don't use hardcoded ATKLOCALEDIR, but deduce it from DLL location, like GLib, GTK etc do. --- ChangeLog | 25 +++++++++++++++++++++++++ Makefile.am | 2 +- atk-zip.sh.in | 12 +++++++++--- atk/Makefile.am | 7 ++++++- atk/atk.def | 6 ++++++ atk/atk.rc.in | 30 ++++++++++++++++++++++++++++++ atk/atkobject.c | 26 ++++++++++++++++++++++++++ configure.in | 1 + 8 files changed, 104 insertions(+), 5 deletions(-) create mode 100644 atk/atk.rc.in diff --git a/ChangeLog b/ChangeLog index 7e9985c..44c7bf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2003-06-13 Tor Lillqvist + + * atk/atkobject.c (atk_role_get_localized_name): Set + gettext_initialized. + + * atk-zip.sh.in (DEVZIP): libtool 1.5 installs DLLs in the bin + directory, so look there, too. Include the message catalogs. + + Merge from HEAD: + + * Makefile.am (EXTRA_DIST): Dist atk-zip.sh.in, not atk-zip.sh. + + * atk/atk.def: Add missing entries, thanks to Cedric Gustin. + + * atk/atk.rc.in: New file, for version info in the DLL on + Windows. Similar as in GLib, GTK, etc. + + * configure.in: Expand atk/atk.rc. + + * atk/Makefile.am: Use atk.rc on Windows. + (EXTRA_DIST): Distribute atk.rc.in. + + * atk/atkobject.c: On Windows, don't use hardcoded ATKLOCALEDIR, + but deduce it from DLL location, like GLib, GTK etc do. + 2003-05-20 Telsa Gwynne * configure.in: Added cy to ALL_LINGUAS diff --git a/Makefile.am b/Makefile.am index fe970b1..d21f511 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ EXTRA_DIST = \ atk.pc.in \ atk.spec.in \ atk.spec \ - atk-zip.sh + atk-zip.sh.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = atk.pc diff --git a/atk-zip.sh.in b/atk-zip.sh.in index 68bf2f1..21242c0 100755 --- a/atk-zip.sh.in +++ b/atk-zip.sh.in @@ -4,13 +4,19 @@ ZIP=/tmp/atk-@ATK_VERSION@-`date +%Y%m%d`.zip DEVZIP=/tmp/atk-dev-@ATK_VERSION@-`date +%Y%m%d`.zip -cd @prefix@ +cd @prefix@ rm $ZIP -zip -r $ZIP -@ < + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @ATK_MAJOR_VERSION@,@ATK_MINOR_VERSION@,@ATK_MICRO_VERSION@,BUILDNUMBER + PRODUCTVERSION @ATK_MAJOR_VERSION@,@ATK_MINOR_VERSION@,@ATK_MICRO_VERSION@,0 + FILEFLAGSMASK 0 + FILEFLAGS 0 + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VFT2_UNKNOWN + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "Sun Microsystems Inc." + VALUE "FileDescription", "atk" + VALUE "FileVersion", "@ATK_VERSION@.BUILDNUMBER" + VALUE "InternalName", "libatk-1.0-@LT_CURRENT_MINUS_AGE@" + VALUE "LegalCopyright", "Copyright © Sun Microsystems Inc." + VALUE "OriginalFilename", "libatk-1.0-@LT_CURRENT_MINUS_AGE@.dll" + VALUE "ProductName", "atk" + VALUE "ProductVersion", "@ATK_VERSION@" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END + END diff --git a/atk/atkobject.c b/atk/atkobject.c index d4634c4..9c8561e 100755 --- a/atk/atkobject.c +++ b/atk/atkobject.c @@ -21,6 +21,13 @@ #include +#ifdef G_OS_WIN32 +#define STRICT +#include +#undef STRICT +#undef FOCUS_EVENT /* pollutes the namespace */ +#endif + #include "atk.h" #include "atkmarshal.h" #include "atk-enum-types.h" @@ -1162,6 +1169,23 @@ atk_role_get_name (AtkRole role) return name; } +#ifdef G_OS_WIN32 + +#undef ATKLOCALEDIR + +#define ATKLOCALEDIR get_atk_locale_dir() + +G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) + +static char * +get_atk_locale_dir (void) +{ + return g_win32_get_package_installation_subdirectory + (GETTEXT_PACKAGE, dll_name, "lib/locale"); +} + +#endif + /** * atk_role_get_localized_name: * @role: The #AtkRole whose localized name is required @@ -1179,6 +1203,8 @@ atk_role_get_localized_name (AtkRole role) #ifdef ENABLE_NLS if (!gettext_initialized) { + gettext_initialized = TRUE; + bindtextdomain (GETTEXT_PACKAGE, ATKLOCALEDIR); #ifdef HAVE_BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); diff --git a/configure.in b/configure.in index 82b9f13..9090a1a 100644 --- a/configure.in +++ b/configure.in @@ -227,6 +227,7 @@ po/Makefile.in atk.pc atk-uninstalled.pc atk/Makefile +atk/atk.rc tests/Makefile docs/Makefile atk.spec -- cgit v1.2.1