forked from AuroraMiddleware/gtk
Make spinbuttons work with negative increments. (#137975, Tim Gerla)
2004-04-22 Matthias Clasen <mclasen@redhat.com> * gtk/gtkspinbutton.c (spin_button_at_limit): Make spinbuttons work with negative increments. (#137975, Tim Gerla)
This commit is contained in:
parent
a92c54108e
commit
171d43b206
@ -1,3 +1,8 @@
|
||||
2004-04-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (spin_button_at_limit): Make spinbuttons
|
||||
work with negative increments. (#137975, Tim Gerla)
|
||||
|
||||
Wed Apr 21 21:38:03 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbutton.c (gtk_tool_button_set_label_widget,
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-04-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (spin_button_at_limit): Make spinbuttons
|
||||
work with negative increments. (#137975, Tim Gerla)
|
||||
|
||||
Wed Apr 21 21:38:03 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbutton.c (gtk_tool_button_set_label_widget,
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-04-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (spin_button_at_limit): Make spinbuttons
|
||||
work with negative increments. (#137975, Tim Gerla)
|
||||
|
||||
Wed Apr 21 21:38:03 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbutton.c (gtk_tool_button_set_label_widget,
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-04-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (spin_button_at_limit): Make spinbuttons
|
||||
work with negative increments. (#137975, Tim Gerla)
|
||||
|
||||
Wed Apr 21 21:38:03 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbutton.c (gtk_tool_button_set_label_widget,
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-04-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (spin_button_at_limit): Make spinbuttons
|
||||
work with negative increments. (#137975, Tim Gerla)
|
||||
|
||||
Wed Apr 21 21:38:03 2004 Soeren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* gtk/gtktoolbutton.c (gtk_tool_button_set_label_widget,
|
||||
|
@ -823,14 +823,21 @@ static gboolean
|
||||
spin_button_at_limit (GtkSpinButton *spin_button,
|
||||
GtkArrowType arrow)
|
||||
{
|
||||
GtkArrowType effective_arrow;
|
||||
|
||||
if (spin_button->wrap)
|
||||
return FALSE;
|
||||
|
||||
if (arrow == GTK_ARROW_UP &&
|
||||
if (spin_button->adjustment->step_increment > 0)
|
||||
effective_arrow = arrow;
|
||||
else
|
||||
effective_arrow = arrow == GTK_ARROW_UP ? GTK_ARROW_DOWN : GTK_ARROW_UP;
|
||||
|
||||
if (effective_arrow == GTK_ARROW_UP &&
|
||||
(spin_button->adjustment->upper - spin_button->adjustment->value <= EPSILON))
|
||||
return TRUE;
|
||||
|
||||
if (arrow == GTK_ARROW_DOWN &&
|
||||
if (effective_arrow == GTK_ARROW_DOWN &&
|
||||
(spin_button->adjustment->value - spin_button->adjustment->lower <= EPSILON))
|
||||
return TRUE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user