gnome-settings-daemon r61 - in trunk: . plugins/xsettings



Author: chpe
Date: Fri Jan 25 13:42:06 2008
New Revision: 61
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=61&view=rev

Log:
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.

Modified:
   trunk/ChangeLog
   trunk/plugins/xsettings/gsd-xsettings-manager.c

Modified: trunk/plugins/xsettings/gsd-xsettings-manager.c
==============================================================================
--- trunk/plugins/xsettings/gsd-xsettings-manager.c	(original)
+++ trunk/plugins/xsettings/gsd-xsettings-manager.c	Fri Jan 25 13:42:06 2008
@@ -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 @@
 {
         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 @@
         spawn_with_input (command, add_string->str);
 
         g_string_free (add_string, TRUE);
-        setlocale (LC_NUMERIC, old_locale);
         g_free (old_locale);
 }
 



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