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 536592 - gtk_spin_button_set_adjustment does not trigger update
gtk_spin_button_set_adjustment does not trigger update
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkSpinButton
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-06-04 12:32 UTC by Marcus Brinkmann
Modified: 2014-08-30 04:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk_spin_button_set_adjustment does not change value (1.51 KB, text/plain)
2008-06-04 12:36 UTC, Marcus Brinkmann
Details

Description Marcus Brinkmann 2008-06-04 12:32:35 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.
Comment 1 Marcus Brinkmann 2008-06-04 12:36:29 UTC
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.
Comment 2 Marcus Brinkmann 2008-06-04 12:53:32 UTC
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.
Comment 3 Matthias Clasen 2014-08-30 04:44:13 UTC
this was recently fixed