Commit f713c86d authored by Jehan's avatar Jehan

app: disconnect symmetries' callbacks connected to image signals...

... on symmetry destruction.
Use g_signal_connect_object() which does this automatically.
parent b37ca781
......@@ -167,20 +167,16 @@ gimp_mandala_constructed (GObject *object)
g_object_set_data_full (object, "center-x:max", x_max, g_free);
g_object_set_data_full (object, "center-y:max", y_max, g_free);
g_signal_connect (sym->image, "size-changed-detailed",
G_CALLBACK (gimp_mandala_image_size_changed_cb),
sym);
g_signal_connect_object (sym->image, "size-changed-detailed",
G_CALLBACK (gimp_mandala_image_size_changed_cb),
sym, 0);
}
static void
gimp_mandala_finalize (GObject *object)
{
GimpSymmetry *sym = GIMP_SYMMETRY (object);
GimpMandala *mandala = GIMP_MANDALA (object);
g_signal_handlers_disconnect_by_func (sym->image,
gimp_mandala_image_size_changed_cb,
object);
if (mandala->horizontal_guide)
g_object_unref (mandala->horizontal_guide);
mandala->horizontal_guide = NULL;
......
......@@ -193,9 +193,9 @@ gimp_mirror_constructed (GObject *object)
g_object_set_data_full (object, "horizontal-position:max", y_max, g_free);
g_object_set_data_full (object, "vertical-position:max", x_max, g_free);
g_signal_connect (sym->image, "size-changed-detailed",
G_CALLBACK (gimp_mirror_image_size_changed_cb),
sym);
g_signal_connect_object (sym->image, "size-changed-detailed",
G_CALLBACK (gimp_mirror_image_size_changed_cb),
sym, 0);
}
static void
......
......@@ -165,9 +165,9 @@ gimp_tiling_constructed (GObject *object)
g_object_set_data_full (object, "y-interval:max", y_max, g_free);
g_object_set_data_full (object, "shift:max", shift_max, g_free);
g_signal_connect (sym->image, "size-changed-detailed",
G_CALLBACK (gimp_tiling_image_size_changed_cb),
sym);
g_signal_connect_object (sym->image, "size-changed-detailed",
G_CALLBACK (gimp_tiling_image_size_changed_cb),
sym, 0);
/* Set reasonable defaults. */
tiling->interval_x = gimp_image_get_width (sym->image) / 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment