GNOME Bugzilla – Bug 151178
spin button increments/decrements by 2
Last modified: 2004-12-22 21:47:04 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.
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 ?
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.
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
I'm seeing the same problem. It seems to be something to do with the spin button timer. I
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.
Created attachment 32846 [details] [review] Documentation Update Fair enough