GNOME Bugzilla – Bug 536592
gtk_spin_button_set_adjustment does not trigger update
Last modified: 2014-08-30 04:44:13 UTC
Please describe the problem: Wehn the adjustment is changed in a spinbutton, no value-changed signal is emitted and the display is not updated. Steps to reproduce: 1. Show a gtk spin button. 2. Change its adjustment such that the value changes Actual results: Nothing visually, and no value-changed signal is emitted. Expected results: I would expect the spin button value changed signal to be emitted, and the display to be updated. Does this happen every time? Yes. Other information: Test program see attachment.
Created attachment 112120 [details] gtk_spin_button_set_adjustment does not change value Compile with gcc -o spinbutton spinbutton.c `pkg-config --cflags --libs gtk+-2.0` Spin a value greater than 40. Press the toggle button. Observe that the value is not changed, and no value-changed signal is emitted (see debug output). Now press toggle button again, and spin a value smaller than 40 but different from 20. Note that when first spinning, the value is clamped. Press toggle button again, and observe that the value is not updated according to the adjustment (it should be 20 now). Spinning sets the new value relative to the value before changing the adjustment.
Work around: A call to gtk_spin_button_update () after changing the adjustment helps in that it updates the arrow buttons sensitivity and in that it clamps the value to the new adjustment's range. However, it does not set the value of the spin button according to the value in the adjustment.
this was recently fixed