From 6e3611a924af631ea753b2b1c0a473822f56fe80 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 1 Aug 2005 13:50:38 +0000 Subject: [PATCH] Call gettext_initialization() here as well. (#311612, Dan Winship) 2005-08-01 Matthias Clasen * gtk/gtkmain.c (do_post_parse_initialization): Call gettext_initialization() here as well. (#311612, Dan Winship) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkmain.c | 36 +++++++++++++++++++----------------- 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index d83e080e41..63f69c42de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-01 Matthias Clasen + + * gtk/gtkmain.c (do_post_parse_initialization): Call + gettext_initialization() here as well. (#311612, Dan Winship) + 2005-07-30 Hans Breuer * gtk/makefile.msc.in : updated diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d83e080e41..63f69c42de 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-08-01 Matthias Clasen + + * gtk/gtkmain.c (do_post_parse_initialization): Call + gettext_initialization() here as well. (#311612, Dan Winship) + 2005-07-30 Hans Breuer * gtk/makefile.msc.in : updated diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index d83e080e41..63f69c42de 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-08-01 Matthias Clasen + + * gtk/gtkmain.c (do_post_parse_initialization): Call + gettext_initialization() here as well. (#311612, Dan Winship) + 2005-07-30 Hans Breuer * gtk/makefile.msc.in : updated diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index d7bb00084e..7ad0111767 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -481,6 +481,19 @@ do_pre_parse_initialization (int *argc, gtk_modules_string = g_string_new (env_string); } +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 +} + static void do_post_parse_initialization (int *argc, char ***argv) @@ -488,6 +501,8 @@ do_post_parse_initialization (int *argc, if (gtk_initialized) return; + gettext_initialization (); + if (g_fatal_warnings) { GLogLevelFlags fatal_mask; @@ -599,19 +614,6 @@ 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. @@ -649,11 +651,11 @@ gtk_init_with_args (int *argc, GOptionGroup *gtk_group; gboolean retval; - gettext_initialization (); - if (gtk_initialized) return TRUE; + gettext_initialization (); + if (!check_setugid ()) return FALSE; @@ -696,11 +698,11 @@ gtk_parse_args (int *argc, GOptionContext *option_context; GOptionGroup *gtk_group; - gettext_initialization (); - if (gtk_initialized) return TRUE; + gettext_initialization (); + if (!check_setugid ()) return FALSE;