Merged from trunk:
2007-11-28 Tor Lillqvist <tml@novell.com> Merged from trunk: A proper build of GNU libintl is supposed to export the variable _nl_msg_cat_cntr. configure looks for that variable in order to recognize GNU gettext. If it sees that it is indeed GNU gettext that is used, it decides to install message catalogs in share/locale, otherwise in lib/locale. Until now on Windows I have built GTK+ against a build of GNU gettext that did not export _nl_msg_cat_cntr. But this will change, so we can't assume message catalogs are always in lib/locale. * gtk/gtkmain.c: (_gtk_get_localedir) [Win32]: Rework to handle GTK_LOCALEDIR being either in "lib" or "share". Move the function before the inclusion of gtkprivate.h so that it sees the original GTK_LOCALEDIR. * gtk-zip.sh.in: Check whether the message catalogs are in share/locale or lib/locale. * config.h.win32.in: Tack on "/share/locale" to GTK_LOCALEDIR so that the code in _gtk_get_localedir() will find the slashes. svn path=/branches/gtk-2-12/; revision=19085
This commit is contained in:
committed by
Tor Lillqvist
parent
0937798f0e
commit
c209b1c750
24
ChangeLog
24
ChangeLog
@@ -1,3 +1,27 @@
|
||||
2007-11-28 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Merged from trunk:
|
||||
|
||||
A proper build of GNU libintl is supposed to export the variable
|
||||
_nl_msg_cat_cntr. configure looks for that variable in order to
|
||||
recognize GNU gettext. If it sees that it is indeed GNU gettext
|
||||
that is used, it decides to install message catalogs in
|
||||
share/locale, otherwise in lib/locale. Until now on Windows I have
|
||||
built GTK+ against a build of GNU gettext that did not export
|
||||
_nl_msg_cat_cntr. But this will change, so we can't assume message
|
||||
catalogs are always in lib/locale.
|
||||
|
||||
* gtk/gtkmain.c: (_gtk_get_localedir) [Win32]: Rework to handle
|
||||
GTK_LOCALEDIR being either in "lib" or "share". Move the function
|
||||
before the inclusion of gtkprivate.h so that it sees the original
|
||||
GTK_LOCALEDIR.
|
||||
|
||||
* gtk-zip.sh.in: Check whether the message catalogs are in
|
||||
share/locale or lib/locale.
|
||||
|
||||
* config.h.win32.in: Tack on "/share/locale" to GTK_LOCALEDIR so
|
||||
that the code in _gtk_get_localedir() will find the slashes.
|
||||
|
||||
2007-11-28 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Merged from trunk: Fix #375893, patch by Ben Hague:
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
#define ENABLE_NLS 1
|
||||
|
||||
/* Define the location where the catalogs will be installed */
|
||||
#define GTK_LOCALEDIR "UNUSED"
|
||||
#define GTK_LOCALEDIR "UNUSED/share/locale"
|
||||
|
||||
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
|
||||
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
|
||||
|
||||
@@ -14,7 +14,6 @@ cp -p @abs_srcdir@/COPYING share/doc/gtk+-dev-@GTK_VERSION@
|
||||
|
||||
rm $ZIP
|
||||
zip $ZIP -@ <<EOF
|
||||
COPYING.LIB-2
|
||||
etc/gtk-2.0/gdk-pixbuf.loaders
|
||||
etc/gtk-2.0/gtkrc
|
||||
etc/gtk-2.0/gtk.immodules
|
||||
@@ -32,8 +31,21 @@ zip $ZIP share/themes/Default/gtk-2.0-key/gtkrc
|
||||
zip $ZIP share/themes/Emacs/gtk-2.0-key/gtkrc
|
||||
zip $ZIP share/themes/MS-Windows/gtk-2.0/gtkrc
|
||||
|
||||
zip $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
|
||||
zip $ZIP lib/locale/*/LC_MESSAGES/gtk20-properties.mo
|
||||
if [ -f lib/locale/de/LC_MESSAGES/gtk20.mo -a -f share/locale/de/LC_MESSAGES/gtk20.mo ]; then
|
||||
if [ lib/locale/de/LC_MESSAGES/gtk20.mo -nt share/locale/de/LC_MESSAGES/gtk20.mo ]; then
|
||||
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
|
||||
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20-properties.mo
|
||||
else
|
||||
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20.mo
|
||||
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20-properties.mo
|
||||
fi
|
||||
elif [ -f lib/locale/de/LC_MESSAGES/gtk20.mo ]; then
|
||||
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
|
||||
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20-properties.mo
|
||||
else
|
||||
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20.mo
|
||||
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20-properties.mo
|
||||
fi
|
||||
|
||||
zip -r $ZIP share/doc/gtk+-@GTK_VERSION@
|
||||
|
||||
|
||||
@@ -67,12 +67,52 @@
|
||||
#include "gtkwidget.h"
|
||||
#include "gtkwindow.h"
|
||||
#include "gtktooltip.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include "gdk/gdkprivate.h" /* for GDK_WINDOW_DESTROYED */
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
|
||||
|
||||
/* This here before inclusion of gtkprivate.h so that it sees the
|
||||
* original GTK_LOCALEDIR definition. Yeah, this is a bit sucky.
|
||||
*/
|
||||
const gchar *
|
||||
_gtk_get_localedir (void)
|
||||
{
|
||||
static char *gtk_localedir = NULL;
|
||||
if (gtk_localedir == NULL)
|
||||
{
|
||||
const gchar *p;
|
||||
gchar *temp;
|
||||
|
||||
/* GTK_LOCALEDIR ends in either /lib/locale or
|
||||
* /share/locale. Scan for that slash.
|
||||
*/
|
||||
p = GTK_LOCALEDIR + strlen (GTK_LOCALEDIR);
|
||||
while (*--p != '/')
|
||||
;
|
||||
while (*--p != '/')
|
||||
;
|
||||
|
||||
temp = g_win32_get_package_installation_subdirectory
|
||||
(GETTEXT_PACKAGE, dll_name, p);
|
||||
|
||||
/* gtk_localedir is passed to bindtextdomain() which isn't
|
||||
* UTF-8-aware.
|
||||
*/
|
||||
gtk_localedir = g_win32_locale_filename_from_utf8 (temp);
|
||||
g_free (temp);
|
||||
}
|
||||
return gtk_localedir;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#include "gtkprivate.h"
|
||||
|
||||
/* Private type definitions
|
||||
*/
|
||||
typedef struct _GtkInitFunction GtkInitFunction;
|
||||
@@ -268,8 +308,6 @@ check_setugid (void)
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
|
||||
|
||||
const gchar *
|
||||
_gtk_get_datadir (void)
|
||||
{
|
||||
@@ -292,26 +330,6 @@ _gtk_get_libdir (void)
|
||||
return gtk_libdir;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
_gtk_get_localedir (void)
|
||||
{
|
||||
static char *gtk_localedir = NULL;
|
||||
if (gtk_localedir == NULL)
|
||||
{
|
||||
gchar *temp;
|
||||
|
||||
temp = g_win32_get_package_installation_subdirectory
|
||||
(GETTEXT_PACKAGE, dll_name, "lib\\locale");
|
||||
|
||||
/* gtk_localedir is passed to bindtextdomain() which isn't
|
||||
* UTF-8-aware.
|
||||
*/
|
||||
gtk_localedir = g_win32_locale_filename_from_utf8 (temp);
|
||||
g_free (temp);
|
||||
}
|
||||
return gtk_localedir;
|
||||
}
|
||||
|
||||
const gchar *
|
||||
_gtk_get_sysconfdir (void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user