diff options
author | Christian Persch <chpe@gnome.org> | 2008-01-25 13:42:06 +0000 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-01-25 13:42:06 +0000 |
commit | 5af0b08b6e6cb9d9d6d65a6557c2f83ecc67e080 (patch) | |
tree | 9ce9fc1e4091dd2500e185e3cc8b9425fd843f5a /plugins | |
parent | 3bdb40b4a8e1873b4d0edc32dfc4fecd5668777d (diff) | |
download | gnome-settings-daemon-5af0b08b6e6cb9d9d6d65a6557c2f83ecc67e080.tar.gz |
Use g_ascii_dtostr instead of setlocale. Bug #505470.
2008-01-25 Christian Persch <chpe@gnome.org>
* plugins/xsettings/gsd-xsettings-manager.c:
(xft_settings_set_xresources): Use g_ascii_dtostr instead of
setlocale. Bug #505470.
svn path=/trunk/; revision=61
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/xsettings/gsd-xsettings-manager.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c index 10ab0232..4b4425df 100644 --- a/plugins/xsettings/gsd-xsettings-manager.c +++ b/plugins/xsettings/gsd-xsettings-manager.c @@ -29,8 +29,6 @@ #include <string.h> #include <errno.h> -#include <locale.h> - #include <glib.h> #include <glib/gi18n.h> #include <gdk/gdk.h> @@ -455,17 +453,15 @@ xft_settings_set_xresources (GnomeXftSettings *settings) { const char *command; GString *add_string; - char *old_locale; + char dpibuf[G_ASCII_DTOSTR_BUF_SIZE]; command = "xrdb -nocpp -merge"; add_string = g_string_new (NULL); - old_locale = g_strdup (setlocale (LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); g_string_append_printf (add_string, - "Xft.dpi: %f\n", - settings->dpi / 1024.0); + "Xft.dpi: %s\n", + g_ascii_dtostr (dpibuf, sizeof (dpibuf), (double) settings->dpi / 1024.0)); g_string_append_printf (add_string, "Xft.antialias: %d\n", settings->antialias); @@ -482,7 +478,6 @@ xft_settings_set_xresources (GnomeXftSettings *settings) spawn_with_input (command, add_string->str); g_string_free (add_string, TRUE); - setlocale (LC_NUMERIC, old_locale); g_free (old_locale); } |