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 151178 - spin button increments/decrements by 2
spin button increments/decrements by 2
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-08-27 03:28 UTC by ken solomon
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Example code showing problem. (1.04 KB, text/plain)
2004-10-15 11:37 UTC, Loz
  Details
Documentation Update (424 bytes, patch)
2004-10-20 16:53 UTC, Loz
none Details | Review

Description ken solomon 2004-08-27 03:28:43 UTC
When using a spin button in my program the value changes by 2(it should be 1).
This did not occur until upgrading to the 2.4.7 series of Gtk+. Down-grading to
an older version of Gtk+(2.4.4) fixes the problem.
Comment 1 Matthias Clasen 2004-08-27 13:39:40 UTC
The spinbutton demos in testgtk work for me as they always did.
So something must be different in the way you are using the spinbutton.
Can you extract a small selfcontained testcase that still shows the problem ?
Comment 2 ken solomon 2004-08-28 21:26:18 UTC
I've discovered that it was an error in my program that affected the action of
the spin button in Gtk(2.4.7) but not in Gtk(2.4.4)?. I don't know the exact
cause but can confirm that the spin button works correctly now.
Comment 3 Loz 2004-10-15 11:37:33 UTC
Created attachment 32637 [details]
Example code showing problem.

I'm seeing the same problem. I think it is something to do with the spin
button's timer. If I comment out the call to sleep in my callback then the
control increments by 1. If I put it in it increments by 2 (calling two changed
events in the process).
This is agains 2.5.2
Comment 4 Loz 2004-10-15 11:39:04 UTC
I'm seeing the same problem. It seems to be something to do with the spin button
timer. I
Comment 5 Matthias Clasen 2004-10-20 06:23:17 UTC
Doing expensive operations in the value_changed callback (or even stupid things
like sleeping) is going to affect the repeat functionality, which is implemented
using timeouts, there is no way around it. Even if we reverted the change
between 2.4.4 and 2.4.7, you would still have trouble once the repeating has
started. You should reorganize your code and move the expensive calculation out
of the value_changed callback.
Comment 6 Loz 2004-10-20 16:53:12 UTC
Created attachment 32846 [details] [review]
Documentation Update

Fair enough