[totem] main: Call setlocale() on startup to ensure locale & gettext are initialised



commit 85451a6f4bfec3226a5bbaf7738b5e3deb7fe42e
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Dec 26 12:04:34 2012 +0000

    main: Call setlocale() on startup to ensure locale & gettext are initialised
    
    This reverts commit 99966f034601f1b652fec0e7292f5e8940168152 and implements
    a better fix which doesnât have the potential to break startup notification.
    
    See the discussion in https://bugzilla.gnome.org/show_bug.cgi?id=690705 for
    details.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=690682

 src/totem.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/totem.c b/src/totem.c
index 228b325..67e840b 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -32,6 +32,7 @@
 #include <glib-object.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <locale.h>
 #include <string.h>
 
 #ifdef GDK_WINDOWING_X11
@@ -235,6 +236,7 @@ main (int argc, char **argv)
 {
 	Totem *totem;
 
+	setlocale (LC_ALL, "");
 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 	textdomain (GETTEXT_PACKAGE);
@@ -249,7 +251,6 @@ main (int argc, char **argv)
 #endif
 
 	g_type_init ();
-	gtk_init (&argc, &argv);
 
 	g_set_prgname ("totem");
 	g_set_application_name (_("Videos"));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]