mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 20:12:30 +00:00
use rint(). The old behaviour was broken for neagtive values.
2000-11-27 Sven Neumann <sven@gimp.org> * libgimp/gimpwidgets.c (gimp_int_adjustment_update): use rint(). The old behaviour was broken for neagtive values.
This commit is contained in:
parent
af3aec76bb
commit
ceab8aa358
|
@ -1,3 +1,8 @@
|
|||
2000-11-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/gimpwidgets.c (gimp_int_adjustment_update): use rint().
|
||||
The old behaviour was broken for neagtive values.
|
||||
|
||||
2000-11-27 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* plug-ins/print/README
|
||||
|
|
|
@ -1007,7 +1007,7 @@ gimp_mem_size_entry_new (GtkAdjustment *adjustment)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if ( (gint)adjustment->value % (mem_size_unit * 1024) != 0 )
|
||||
if ( (gint) adjustment->value % (mem_size_unit * 1024) != 0 )
|
||||
break;
|
||||
mem_size_unit *= 1024;
|
||||
}
|
||||
|
@ -1221,7 +1221,7 @@ gimp_menu_item_update (GtkWidget *widget,
|
|||
* value.
|
||||
*
|
||||
* Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded
|
||||
* with (#gint) (value + 0.5).
|
||||
* with (#gint) rint (value).
|
||||
**/
|
||||
void
|
||||
gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||
|
@ -1230,7 +1230,7 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
|||
gint *val;
|
||||
|
||||
val = (gint *) data;
|
||||
*val = (gint) (adjustment->value + 0.5);
|
||||
*val = (gint) rint (adjustment->value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1007,7 +1007,7 @@ gimp_mem_size_entry_new (GtkAdjustment *adjustment)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if ( (gint)adjustment->value % (mem_size_unit * 1024) != 0 )
|
||||
if ( (gint) adjustment->value % (mem_size_unit * 1024) != 0 )
|
||||
break;
|
||||
mem_size_unit *= 1024;
|
||||
}
|
||||
|
@ -1221,7 +1221,7 @@ gimp_menu_item_update (GtkWidget *widget,
|
|||
* value.
|
||||
*
|
||||
* Note that the #GtkAdjustment's value (which is a #gfloat) will be rounded
|
||||
* with (#gint) (value + 0.5).
|
||||
* with (#gint) rint (value).
|
||||
**/
|
||||
void
|
||||
gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
||||
|
@ -1230,7 +1230,7 @@ gimp_int_adjustment_update (GtkAdjustment *adjustment,
|
|||
gint *val;
|
||||
|
||||
val = (gint *) data;
|
||||
*val = (gint) (adjustment->value + 0.5);
|
||||
*val = (gint) rint (adjustment->value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue