aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-06-24 16:01:51 -0700
committerJoão Valverde <j@v6e.pt>2016-06-25 15:56:34 +0000
commitb47aca5fd1782cea68b2cba54263a75b5a3007e8 (patch)
tree6e24a76865882a0ae121fbb2b54a94d8f82032f8 /ui/gtk
parent79836fa23ae275466fd7414967bd17e0f629c888 (diff)
Minor UI locale updates.
Qt: Call setlocale before commandline_early_options so that we get proper "-v" output, similar to the GTK+ UI. GTK+: Call setlocale once at startup. Bug: 11960 Change-Id: I3c3a196b9d94fc768e1085200891bc8d67e21a08 Reviewed-on: https://code.wireshark.org/review/16132 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'ui/gtk')
-rw-r--r--ui/gtk/main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/ui/gtk/main.c b/ui/gtk/main.c
index 9c61cae68a..e7d37df5cd 100644
--- a/ui/gtk/main.c
+++ b/ui/gtk/main.c
@@ -2095,7 +2095,10 @@ main(int argc, char *argv[])
cmdarg_err_init(wireshark_cmdarg_err, wireshark_cmdarg_err_cont);
- /* Set the C-language locale to the native environment. */
+ /* Set the current locale according to the program environment.
+ * We haven't localized anything, but some GTK widgets are localized
+ * (the file selection dialogue, for example).
+ * This also sets the C-language locale to the native environment. */
setlocale(LC_ALL, "");
#ifdef _WIN32
arg_list_utf_16to8(argc, argv);
@@ -2235,12 +2238,6 @@ main(int argc, char *argv[])
}
#endif
- /* Set the current locale according to the program environment.
- * We haven't localized anything, but some GTK widgets are localized
- * (the file selection dialogue, for example).
- * This also sets the C-language locale to the native environment. */
- setlocale (LC_ALL, "");
-
/* Let GTK get its args (will need an X server, so do this after command line only commands handled) */
gtk_init (&argc, &argv);