diff --git a/ChangeLog b/ChangeLog index b9a41c3cb4..4afc97cf6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-04-22 Tor Lillqvist + + * gtk/gtkmain.c: Initailize gettext before use. Calling + bindtextdomain() and bind_textdomain_codeset() in + do_post_parse_initialization() is too late. Put the calls in a new + function gettext_initialization(), and call that from + gtk_init_with_args() and gtk_parse_args(). Fixes #170948 for + GTK+'s part, but the same problem occurs also at least in + atk. Thanks do Robert Ögren, Daniel Atallah and Kevin Strange. + 2005-04-19 Ivan, Wong Yat Cheung * gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Match diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b9a41c3cb4..4afc97cf6c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2005-04-22 Tor Lillqvist + + * gtk/gtkmain.c: Initailize gettext before use. Calling + bindtextdomain() and bind_textdomain_codeset() in + do_post_parse_initialization() is too late. Put the calls in a new + function gettext_initialization(), and call that from + gtk_init_with_args() and gtk_parse_args(). Fixes #170948 for + GTK+'s part, but the same problem occurs also at least in + atk. Thanks do Robert Ögren, Daniel Atallah and Kevin Strange. + 2005-04-19 Ivan, Wong Yat Cheung * gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Match diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b9a41c3cb4..4afc97cf6c 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2005-04-22 Tor Lillqvist + + * gtk/gtkmain.c: Initailize gettext before use. Calling + bindtextdomain() and bind_textdomain_codeset() in + do_post_parse_initialization() is too late. Put the calls in a new + function gettext_initialization(), and call that from + gtk_init_with_args() and gtk_parse_args(). Fixes #170948 for + GTK+'s part, but the same problem occurs also at least in + atk. Thanks do Robert Ögren, Daniel Atallah and Kevin Strange. + 2005-04-19 Ivan, Wong Yat Cheung * gdk/win32/gdkfont-win32.c (gdk_font_load_internal): Match diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index f47f1eb3ff..68785b4464 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -464,15 +464,6 @@ do_post_parse_initialization (int *argc, if (gtk_debug_flags & GTK_DEBUG_UPDATES) gdk_window_set_debug_updates (TRUE); -#ifdef ENABLE_NLS - bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR); - bindtextdomain (GETTEXT_PACKAGE "-properties", GTK_LOCALEDIR); -# ifdef HAVE_BIND_TEXTDOMAIN_CODESET - bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); - bind_textdomain_codeset (GETTEXT_PACKAGE "-properties", "UTF-8"); -# endif -#endif - { /* Translate to default:RTL if you want your widgets * to be RTL, otherwise translate to default:LTR. @@ -572,6 +563,19 @@ gtk_get_option_group (gboolean open_default_display) return group; } +static void +gettext_initialization (void) +{ +#ifdef ENABLE_NLS + bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR); + bindtextdomain (GETTEXT_PACKAGE "-properties", GTK_LOCALEDIR); +# ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + bind_textdomain_codeset (GETTEXT_PACKAGE "-properties", "UTF-8"); +# endif +#endif +} + /** * gtk_init_with_args: * @argc: a pointer to the number of command line arguments. @@ -615,6 +619,8 @@ gtk_init_with_args (int *argc, if (!check_setugid ()) return FALSE; + gettext_initialization (); + gtk_group = gtk_get_option_group (TRUE); context = g_option_context_new (parameter_string); @@ -660,6 +666,8 @@ gtk_parse_args (int *argc, if (!check_setugid ()) return FALSE; + gettext_initialization (); + option_context = g_option_context_new (NULL); g_option_context_set_ignore_unknown_options (option_context, TRUE); g_option_context_set_help_enabled (option_context, FALSE);