Commit 2503eac0 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

Bug 330743 - Up/down spinbuttons won't take zeros and exhibit very strange

2008-04-03  Tor Lillqvist  <tml@novell.com>

	Bug 330743 - Up/down spinbuttons won't take zeros and exhibit
	very strange behavior

	* gtk/gtkspinbutton.c (gtk_spin_button_insert_text) [Win32]: Add
	workaround for a specific kind of screwed up locale setting.


svn path=/trunk/; revision=19972
parent 1d119938
2008-04-03 Tor Lillqvist <tml@novell.com>
Bug 330743 - Up/down spinbuttons won't take zeros and exhibit very
strange behavior
* gtk/gtkspinbutton.c (gtk_spin_button_insert_text) [Win32]: Add
workaround for a specific kind of screwed up locale setting.
2008-04-02 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkcolor-x11.c: Don't call XFreeColormap on foreign
......
......@@ -1453,6 +1453,26 @@ gtk_spin_button_insert_text (GtkEditable *editable,
else
pos_sign = '+';
#ifdef G_OS_WIN32
/* Workaround for bug caused by some Windows application messing
* up the positive sign of the current locale, more specifically
* HKEY_CURRENT_USER\Control Panel\International\sPositiveSign.
* See bug #330743 and for instance
* http://www.msnewsgroups.net/group/microsoft.public.dotnet.languages.csharp/topic36024.aspx
*
* I don't know if the positive sign always gets bogusly set to
* a digit when the above Registry value is corrupted as
* described. (In my test case, it got set to "8", and in the
* bug report above it presumably was set ot "0".) Probably it
* might get set to almost anything? So how to distinguish a
* bogus value from some correct one for some locale? That is
* probably hard, but at least we should filter out the
* digits...
*/
if (pos_sign >= '0' && pos_sign <= '9')
pos_sign = '+';
#endif
for (sign=0, i=0; i<entry_length; i++)
if ((entry->text[i] == neg_sign) ||
(entry->text[i] == pos_sign))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment