mirror of https://github.com/GNOME/gimp.git
moved the g_signal_stop_emission_by_name() right before the calls to
2003-08-16 Michael Natterer <mitch@gimp.org> * libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback): moved the g_signal_stop_emission_by_name() right before the calls to gimp_size_entry_set_refval() so we only block the duplicate "value_changed" signal, not all of them. Fixes bug #107633.
This commit is contained in:
parent
ab566982ef
commit
790491e50f
|
@ -1,3 +1,10 @@
|
||||||
|
2003-08-16 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback): moved
|
||||||
|
the g_signal_stop_emission_by_name() right before the calls to
|
||||||
|
gimp_size_entry_set_refval() so we only block the duplicate
|
||||||
|
"value_changed" signal, not all of them. Fixes bug #107633.
|
||||||
|
|
||||||
2003-08-16 Maurits Rijk <lpeek.mrijk@consunet.nl>
|
2003-08-16 Maurits Rijk <lpeek.mrijk@consunet.nl>
|
||||||
|
|
||||||
* plug-ins/common/blur.c
|
* plug-ins/common/blur.c
|
||||||
|
|
|
@ -976,21 +976,16 @@ typedef struct
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_coordinates_callback (GtkWidget *widget,
|
gimp_coordinates_callback (GtkWidget *widget,
|
||||||
gpointer data)
|
GimpCoordinatesData *gcd)
|
||||||
{
|
{
|
||||||
GimpCoordinatesData *gcd;
|
|
||||||
gdouble new_x;
|
gdouble new_x;
|
||||||
gdouble new_y;
|
gdouble new_y;
|
||||||
|
|
||||||
gcd = (GimpCoordinatesData *) data;
|
|
||||||
|
|
||||||
new_x = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0);
|
new_x = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0);
|
||||||
new_y = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 1);
|
new_y = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 1);
|
||||||
|
|
||||||
if (gimp_chain_button_get_active (gcd->chainbutton))
|
if (gimp_chain_button_get_active (gcd->chainbutton))
|
||||||
{
|
{
|
||||||
g_signal_stop_emission_by_name (widget, "value_changed");
|
|
||||||
|
|
||||||
if (gcd->chain_constrains_ratio)
|
if (gcd->chain_constrains_ratio)
|
||||||
{
|
{
|
||||||
if ((gcd->orig_x != 0) && (gcd->orig_y != 0))
|
if ((gcd->orig_x != 0) && (gcd->orig_y != 0))
|
||||||
|
@ -999,6 +994,8 @@ gimp_coordinates_callback (GtkWidget *widget,
|
||||||
{
|
{
|
||||||
gcd->last_x = new_x;
|
gcd->last_x = new_x;
|
||||||
gcd->last_y = new_y = (new_x * gcd->orig_y) / gcd->orig_x;
|
gcd->last_y = new_y = (new_x * gcd->orig_y) / gcd->orig_x;
|
||||||
|
|
||||||
|
g_signal_stop_emission_by_name (widget, "value_changed");
|
||||||
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1,
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1,
|
||||||
new_y);
|
new_y);
|
||||||
}
|
}
|
||||||
|
@ -1006,6 +1003,8 @@ gimp_coordinates_callback (GtkWidget *widget,
|
||||||
{
|
{
|
||||||
gcd->last_y = new_y;
|
gcd->last_y = new_y;
|
||||||
gcd->last_x = new_x = (new_y * gcd->orig_x) / gcd->orig_y;
|
gcd->last_x = new_x = (new_y * gcd->orig_x) / gcd->orig_y;
|
||||||
|
|
||||||
|
g_signal_stop_emission_by_name (widget, "value_changed");
|
||||||
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0,
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0,
|
||||||
new_x);
|
new_x);
|
||||||
}
|
}
|
||||||
|
@ -1016,11 +1015,15 @@ gimp_coordinates_callback (GtkWidget *widget,
|
||||||
if (new_x != gcd->last_x)
|
if (new_x != gcd->last_x)
|
||||||
{
|
{
|
||||||
gcd->last_y = new_y = gcd->last_x = new_x;
|
gcd->last_y = new_y = gcd->last_x = new_x;
|
||||||
|
|
||||||
|
g_signal_stop_emission_by_name (widget, "value_changed");
|
||||||
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1, new_x);
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 1, new_x);
|
||||||
}
|
}
|
||||||
else if (new_y != gcd->last_y)
|
else if (new_y != gcd->last_y)
|
||||||
{
|
{
|
||||||
gcd->last_x = new_x = gcd->last_y = new_y;
|
gcd->last_x = new_x = gcd->last_y = new_y;
|
||||||
|
|
||||||
|
g_signal_stop_emission_by_name (widget, "value_changed");
|
||||||
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0, new_y);
|
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (widget), 0, new_y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1129,7 +1132,8 @@ gimp_coordinates_new (GimpUnit unit,
|
||||||
gtk_widget_show (spinbutton);
|
gtk_widget_show (spinbutton);
|
||||||
|
|
||||||
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (sizeentry),
|
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (sizeentry),
|
||||||
(update_policy == GIMP_SIZE_ENTRY_UPDATE_RESOLUTION) || (menu_show_pixels == FALSE) ?
|
(update_policy == GIMP_SIZE_ENTRY_UPDATE_RESOLUTION) ||
|
||||||
|
(menu_show_pixels == FALSE) ?
|
||||||
GIMP_UNIT_INCH : GIMP_UNIT_PIXEL);
|
GIMP_UNIT_INCH : GIMP_UNIT_PIXEL);
|
||||||
|
|
||||||
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (sizeentry), 0, xres, TRUE);
|
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (sizeentry), 0, xres, TRUE);
|
||||||
|
|
Loading…
Reference in New Issue