GNOME Bugzilla – Bug 667590
weird code in scale: find_next_pos()
Last modified: 2012-01-20 20:57:51 UTC
I wonder why in find_next_pos() the code passes the match param, in gtk2 we always pass position=LEFT/TOP and match=0/1, in gtk3 we pass position=LEFT,RIGHT/TOP,BOTOM and match is always=1, I would just drop the match param. It works just fine without and passing the proper position value. Will attach patches shortly.
Created attachment 204895 [details] [review] patch for gtk2
Created attachment 204898 [details] [review] patch for gtk3
Review of attachment 204898 [details] [review]: Removing the redundant match argument is fine, the other change not. ::: gtk/gtkscale.c @@ +1180,3 @@ else { + if (mark->position == GTK_POS_LEFT) I'm sure that that this is not correct. See the comment in line 100, and the code in gtk_scale_add_mark.
Created attachment 204940 [details] [review] patch for gtk3 Oh that LEFT is TOP and BOTTOM is RIGHT was too clever for me. Honestly I think the gtk2 code was better for this. The LEFT/TOP also helps to quickly see whether one change the horizontal or vertical part of the code.
I've removed the match parameter now
could you please also push the changes to 2.24?