[gnome-session] tools: Call setlocale in gl-helper and gles-helper
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] tools: Call setlocale in gl-helper and gles-helper
- Date: Mon, 9 May 2016 19:22:18 +0000 (UTC)
commit 7198a55e6dd8e4ba3694f27a7ef1ecc7025f3034
Author: Ting-Wei Lan <lantw src gnome org>
Date: Sun Apr 24 12:47:31 2016 +0800
tools: Call setlocale in gl-helper and gles-helper
It is required to correctly show translated messages on some locales.
https://bugzilla.gnome.org/show_bug.cgi?id=765487
tools/gnome-session-check-accelerated-gl-helper.c | 3 +++
.../gnome-session-check-accelerated-gles-helper.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tools/gnome-session-check-accelerated-gl-helper.c
b/tools/gnome-session-check-accelerated-gl-helper.c
index 035047b..020f9a4 100644
--- a/tools/gnome-session-check-accelerated-gl-helper.c
+++ b/tools/gnome-session-check-accelerated-gl-helper.c
@@ -71,6 +71,7 @@
#define _GNU_SOURCE
#include <ctype.h>
+#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -418,6 +419,8 @@ main (int argc, char **argv)
GError *error = NULL;
char *renderer = NULL;
+ setlocale (LC_ALL, "");
+
context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, entries, NULL);
diff --git a/tools/gnome-session-check-accelerated-gles-helper.c
b/tools/gnome-session-check-accelerated-gles-helper.c
index 4a6b6a2..2a38d9e 100644
--- a/tools/gnome-session-check-accelerated-gles-helper.c
+++ b/tools/gnome-session-check-accelerated-gles-helper.c
@@ -24,6 +24,7 @@
#include <config.h>
#include <gtk/gtk.h>
+#include <locale.h>
#include <stdlib.h>
#ifdef GDK_WINDOWING_X11
@@ -166,6 +167,8 @@ main (int argc,
int ret = HELPER_NO_ACCEL;
GError *error = NULL;
+ setlocale (LC_ALL, "");
+
context = g_option_context_new (NULL);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
g_option_context_add_main_entries (context, entries, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]