From e608c86f0e93b6c945dabc969b560b51800654b9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 28 Nov 2005 15:58:26 +0000 Subject: [PATCH] Insert an LRM, to prevent -20 to come out as 20- in RTL locales. (#322571, 2005-11-28 Matthias Clasen * gtk/gtkscale.c (_gtk_scale_format_value): Insert an LRM, to prevent -20 to come out as 20- in RTL locales. (#322571, Tze'ela Hebron) --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ gtk/gtkscale.c | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27338b5161..2c63562227 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-11-28 Matthias Clasen + * gtk/gtkscale.c (_gtk_scale_format_value): Insert an LRM, to prevent + -20 to come out as 20- in RTL locales. (#322571, Tze'ela Hebron) + * gtk/gtkaction.c (gtk_action_sync_button_stock_id) (connect_proxy): Buttons use the label property for stock ids. (#322565, Milosz Derezynski) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 27338b5161..2c63562227 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2005-11-28 Matthias Clasen + * gtk/gtkscale.c (_gtk_scale_format_value): Insert an LRM, to prevent + -20 to come out as 20- in RTL locales. (#322571, Tze'ela Hebron) + * gtk/gtkaction.c (gtk_action_sync_button_stock_id) (connect_proxy): Buttons use the label property for stock ids. (#322565, Milosz Derezynski) diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c index 38724adf84..0f2f78dc8c 100644 --- a/gtk/gtkscale.c +++ b/gtk/gtkscale.c @@ -646,8 +646,8 @@ _gtk_scale_format_value (GtkScale *scale, if (fmt) return fmt; else - return g_strdup_printf ("%0.*f", scale->digits, - value); + /* insert a LRM, to prevent -20 to come out as 20- in RTL locales */ + return g_strdup_printf ("\342\200\216%0.*f", scale->digits, value); } static void