[gtk+] Use g_strtod when converting strings for GtkCellRendererSpin
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Use g_strtod when converting strings for GtkCellRendererSpin
- Date: Mon, 20 Dec 2010 15:03:05 +0000 (UTC)
commit 183bf8ac9dfac28f31f9f5fb4dfcb2150d1d9fb1
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 20 10:02:00 2010 -0500
Use g_strtod when converting strings for GtkCellRendererSpin
These strings are likely user-provided values, so we should
respect locale settings.
Reported in bug 637189.
gtk/gtkcellrendererspin.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcellrendererspin.c b/gtk/gtkcellrendererspin.c
index 2a7fc10..fc170bd 100644
--- a/gtk/gtkcellrendererspin.c
+++ b/gtk/gtkcellrendererspin.c
@@ -323,9 +323,11 @@ gtk_cell_renderer_spin_start_editing (GtkCellRenderer *cell,
g_object_get (cell_text, "text", &text, NULL);
if (text)
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin),
- g_ascii_strtod (text, NULL));
- g_free (text);
+ {
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin),
+ g_strtod (text, NULL));
+ g_free (text);
+ }
g_object_set_data_full (G_OBJECT (spin), GTK_CELL_RENDERER_SPIN_PATH,
g_strdup (path), g_free);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]