mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Handle 0 increment, to fix division-by-zero problem. (#82816, George
Wed Jun 12 15:43:38 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle 0 increment, to fix division-by-zero problem. (#82816, George Lebl.)
This commit is contained in:
parent
a98888390a
commit
f51ef574b5
@ -1,3 +1,9 @@
|
||||
Wed Jun 12 15:43:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
|
||||
0 increment, to fix division-by-zero problem.
|
||||
(#82816, George Lebl.)
|
||||
|
||||
Wed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Jun 12 15:43:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
|
||||
0 increment, to fix division-by-zero problem.
|
||||
(#82816, George Lebl.)
|
||||
|
||||
Wed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Jun 12 15:43:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
|
||||
0 increment, to fix division-by-zero problem.
|
||||
(#82816, George Lebl.)
|
||||
|
||||
Wed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Jun 12 15:43:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
|
||||
0 increment, to fix division-by-zero problem.
|
||||
(#82816, George Lebl.)
|
||||
|
||||
Wed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Jun 12 15:43:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
|
||||
0 increment, to fix division-by-zero problem.
|
||||
(#82816, George Lebl.)
|
||||
|
||||
Wed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Jun 12 15:43:38 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
|
||||
0 increment, to fix division-by-zero problem.
|
||||
(#82816, George Lebl.)
|
||||
|
||||
Wed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
|
||||
|
@ -1318,6 +1318,9 @@ gtk_spin_button_snap (GtkSpinButton *spin_button,
|
||||
gdouble tmp;
|
||||
|
||||
inc = spin_button->adjustment->step_increment;
|
||||
if (inc == 0)
|
||||
return;
|
||||
|
||||
tmp = (val - spin_button->adjustment->lower) / inc;
|
||||
if (tmp - floor (tmp) < ceil (tmp) - tmp)
|
||||
val = spin_button->adjustment->lower + floor (tmp) * inc;
|
||||
|
Loading…
Reference in New Issue
Block a user