[Xfce4-commits] <terminal:master> Don't set the locale twice on a normal startup.

Nick Schermer noreply at xfce.org
Sun Feb 7 18:38:01 CET 2010


Updating branch refs/heads/master
         to c52e7d28b509e78a008e642e410ea5348fc5b231 (commit)
       from 5a5b59559025445f3a2740216abe8fc30647cf6e (commit)

commit c52e7d28b509e78a008e642e410ea5348fc5b231
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Feb 7 17:31:59 2010 +0100

    Don't set the locale twice on a normal startup.

 terminal/main.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/terminal/main.c b/terminal/main.c
index 4950d5f..6e710a3 100644
--- a/terminal/main.c
+++ b/terminal/main.c
@@ -44,6 +44,9 @@ usage (void)
 {
   gchar *name = g_get_prgname ();
 
+  /* set locale for the translations below */
+  gtk_set_locale ();
+
   g_print ("%s\n"
            "  %s [%s...]\n\n",
            _("Usage:"), name, _("OPTION"));
@@ -121,9 +124,6 @@ main (int argc, char **argv)
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
   g_set_application_name (_("Terminal"));
 
-  /* required because we don't call gtk_init() prior to usage() */
-  gtk_set_locale ();
-
 #ifndef NDEBUG
   /* Do NOT remove this line for now, If something doesn't work,
    * fix your code instead!
@@ -136,6 +136,9 @@ main (int argc, char **argv)
 
   if (G_UNLIKELY (show_version))
     {
+      /* set locale for the translations below */
+      gtk_set_locale ();
+
       name = g_get_prgname ();
       g_print (_("%s %s (Xfce %s)\n\n"
                  "Copyright (c) %s\n"



More information about the Xfce4-commits mailing list