After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 137234 - spinbutton bug when decimal separator is a comma
spinbutton bug when decimal separator is a comma
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.2.x
Other Windows
: Normal major
: ---
Assigned To: Tor Lillqvist
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-03-15 09:43 UTC by Vincent PENNEC
Modified: 2005-07-05 06:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent PENNEC 2004-03-15 09:43:16 UTC
I think bug 58733 should be reopened.
got same issue with win32/inkscape (and win32/sodipodi as far as i 
remember).
when using ',' as decimal separator in regional settings, spinbuttons are 
unusable (they reset to 0.00 coz they cannot parse the string as a number).

"workaround":when switching to '.' everything is fine.

I'm not 100% sure, but it looks like the version of gtk that comes with 
win32/inkscape is 2.2.0 (see a gtk-2.0\2.2.0 directory and a libgtk-win32-
2.0-0.dll)

http://sourceforge.net/tracker/index.php?
func=detail&aid=916449&group_id=93438&atid=604306
Comment 1 Tor Lillqvist 2004-03-15 14:49:37 UTC
It is more or less a coincidence that there happens to be the 
numbers "2", "0" and "0" in the DLL name. It does *not* mean version 
2.0.0. The name of the GTK DLL is the same in all 2.0.x, 2.1.x, 
2.2.x, 2.3.x and 2.4.x versions, libgtk-win32-2.0-0.dll. This is 
intentional. The name should be the same, as the new versions are 
backward compatible. I.e. even if you upgrade GTK, all applications 
continue to work. The 2.0 in the name is the earliest version of the 
GTK API that the release implements (or something like that), not the 
software's version number. The second "0" is an artefact of the way 
libtool handles version information for DLLs.

The presence of the directory lib/gtk-2.0/2.2.0 doesn't mean that you 
have version 2.2.0 installed, either. To quote configure.in, 2.2.0 
is "the earliest version that this release has forward/backward 
binary compatibility with".

Anyway, spinbuttons work fine also with comma as decimal separator in 
the regional settings with the current versions, GTK 2.2.4 and GLib 
2.2.3. There were several bugs in Bugzilla related to this, other 
than #58733, but they have been fixed. See for instance #115286 and 
#115293.

Most probably it's your GLib that needs updating. With GLib 2.2.2, 
spinbuttons in testgtk indeed don't work (when using a locale with 
decimal commas).
Comment 2 Vincent PENNEC 2004-03-15 17:48:06 UTC
I checked the properties (version) of the dll and I got:
libgtk-win32-2.0-0.dll 2.2.4.0 &
libglib-2.0-0.dll 2.2.3.0
so everything should go fine but it doesn't :
when the (up) arrow is pressed (and maintained) the value increase 
well 0,01 0,02 0,03... but then
if I press up   arrow (a second time) the value resets to 0,01
if I press down arrow (after the increase) the value resets to 0,00
Maybe it's inkscape's fault.

Is there a place where I can find a precompiled testgtk and correct 
dll to test 'em ?
Comment 3 Tor Lillqvist 2004-03-15 18:10:17 UTC
Hmm, this doesn't sound like a duplicate of those old bugs.

Let me get this straight: If you have the decimal separator set to 
comma, when clicking the uparrow, you get the sequence 0,01 0,02 0,03 
but then 0,01 . But if you have the decimal separator set to period, 
you get 0.01 0.02 0.03 0.04 0.05 0.06 etc? Or is it essential that 
you keep the arrow pressed and let the spinbutton "spin" by itself?

Comment 4 Vincent PENNEC 2004-03-15 20:49:48 UTC
french settings (comma as separator):
initial value is 0,00.
If I mousedown on 
uparrow i get the correct sequence 0,01 0,02 until I reach maxvalue (1,00).
if I stop 
(let's say I "mouse up" at mid-range : the string displayed is correct (around "0,50")) 
and then "mouse down" once again the value resets to 0,01 (or 0,00 if I click the down 
arrow) and start increasing from 0,01 (til maxval) if I wait some time on up 
arrow

back to "international settings" (period as separator):
initial value 
is 0.00.
If I mousedown on uparrow i get the correct sequence 0.01 0.02 until I reach 
maxvalue (1.00).
if I stop (let's say I "mouse up" at mid-range : the string displayed 
is correct (around "0.50")) and then "mouse down" once again the value increase by 
0.01 (or start spinning from 0.51 til maxval if I wait some time)
Comment 5 Tor Lillqvist 2004-03-15 22:17:17 UTC
So, are you saying that if you just click several times on the 
uparrow, the sequence works as it should, but if you keep the mouse 
button pressed on the uparrow, then release, then click once more, it 
jumps back to 0,00?
Comment 6 Vincent PENNEC 2004-03-18 15:52:47 UTC
> if you just click several times on the uparrow, the sequence works 
as it should
No,
start value is 0,00 (*)
1 click      => 0,01
1 more click => 0,01
1 more click => 0,01
etc

> if you keep the mouse button pressed on the uparrow, then release, 
then click once more, it jumps back to 0,00
Yes & No : it jumps back to 0,01
I reset value to 0,00 (*)
I press the mouse button a few seconds, it reaches 0,50
I click => 0,01

I reset value to 0,50 (*)
I press MB => value is resetted to 0,00 (or 0,01) then start to 
increase

------
with down arrow now
I set value to 1,00 (*)
I click => 0,99
I click => 0,00

I set value to 1,00 (*)
I press the mouse button, it decreases down to 0,50
I click => 0,00

I set value to 0,50 (*)
I click (or press MB) => 0,00


(*) The value is set by the mean of a slider. It's an "rgb color 
chooser" : there's a slider and a spinbox.
WHEN I ENTER A VALUE ("LOCAL STYLE") DIRECTLY IN THE SPINBOX THE 
VALUE IS  RESETTED (dotted values work well)
0    => 0,00
1    => 1,00
0,50 => 0,00
0.20 => 0,20
Comment 7 Tor Lillqvist 2004-03-22 22:03:00 UTC
BTW, please do check (for instance with Process Explorer from 
sysinternals.com) that your program really is using the glib and GTK 
DLLs you think it is, i.e. that there aren't any older, broken, 
version in the Windows system32 folder, for instance.
Comment 8 Vincent PENNEC 2004-03-25 14:21:18 UTC
so my comments are gone with the last bugzilla crash.

ok so I repost.

psexplorer says the dll used are those bundled with the app (same dir as 
inkscape "distro")

this looks like a win32/inkscape bug because I don't have such bugs with 
win32/gimp2.0pre (test in image resize dialog).

will try to swap the dlls (gimp => inkscape) to check if the bug comme from the 
(too old) dll bundled with the app or from the app itself.
Comment 9 Tor Lillqvist 2004-03-31 01:26:24 UTC
So did it help to use the DLLs from GIMP instead?
Comment 10 Vincent PENNEC 2004-03-31 07:18:34 UTC
No it didn't.
So it looks like it's the app fault.
Comment 11 Matthias Clasen 2005-06-28 13:54:19 UTC
Reopening. Tor, should we close this then ?
Comment 12 Tor Lillqvist 2005-07-05 06:21:23 UTC
I guess this can be closed, if it is the app's fault, unless the original poster
has some fresh information.
Comment 13 Vincent PENNEC 2005-07-05 06:59:05 UTC
everything fine for inkscape 0506200200
I can enter 1.0 (or 1,0) and it's converted to 1,0 and the spinbutton works 
just fine.
Closed.