Ticket #1124 (closed defect: invalid)

Opened 6 years ago

Last modified 4 years ago

New SpinButton range changing the value

Reported by: guest Owned by: axel
Priority: minor Milestone: 0.10.2
Component: general (Gtk+, Glib) Version: 0.9.12
Keywords: spinbutton range value Cc: felipe.lessa@…

Description

In the following program I create a spin button with range between 0 and 100 and having value 50. When the button is clicked, the range is changed to 0 to 55. Of course 50 is within the new range, so the value should be kept unchanged. However, it goes to 45.

If when creating the adjustment I set the page size to 1, the problem vanishes, so: is this the intended behavior? I got bitten because those are the default configurations for spin buttons created with Glade.

Attachments

bug.hs (457 bytes) - added by guest 6 years ago.
Test case.

Change History

Changed 6 years ago by guest

Test case.

  Changed 6 years ago by guest

  • cc felipe.lessa@… added

  Changed 6 years ago by pgavin

  • owner changed from somebody to axel

  Changed 6 years ago by pgavin

  • milestone set to 0.10.2

in reply to: ↑ description   Changed 4 years ago by guest

Replying to guest:

In the following program I create a spin button with range between 0 and 100 and having value 50. When the button is clicked, the range is changed to 0 to 55. Of course 50 is within the new range, so the value should be kept unchanged. However, it goes to 45. If when creating the adjustment I set the page size to 1, the problem vanishes, so: is this the intended behavior? I got bitten because those are the default configurations for spin buttons created with Glade.

I test it, i got WARNING from GTK+:

(Spin:20655): Gtk-WARNING **: GtkSpinButton?: setting an adjustment with non-zero page size is

deprecated

When i change

a <- adjustmentNew 0 0 100 1 10 10

to

a <- adjustmentNew 0 0 100 1 10 0

problem fix.

Looks GTK+ change C code that don't accept non-zero page size of adjustment for SpinButton? That's explain why value change from 55 to 45 after he did spinButtonSetRange.

If he generate those code by Glade, so it's a problem of Glade, not gtk2hs.

-- Andy

  Changed 4 years ago by axel

  • status changed from new to closed
  • resolution set to invalid
Note: See TracTickets for help on using tickets.