From a7716c187fe4e6cf212f024c675930b377a8d422 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 23 Sep 2002 16:14:15 +0000 Subject: Patch from Joshua N Pritikin to fix problem where signal connection wasn't Mon Sep 23 12:12:48 2002 Owen Taylor * gtk/gtkspinbutton.c: Patch from Joshua N Pritikin to fix problem where signal connection wasn't removed from adjustment on finalize. (#93962) --- gtk/gtkspinbutton.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gtk/gtkspinbutton.c') diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 7c7efc8720..96858e704f 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -482,7 +482,7 @@ gtk_spin_button_init (GtkSpinButton *spin_button) static void gtk_spin_button_finalize (GObject *object) { - gtk_object_unref (GTK_OBJECT (GTK_SPIN_BUTTON (object)->adjustment)); + gtk_spin_button_set_adjustment (GTK_SPIN_BUTTON (object), NULL); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -1640,11 +1640,10 @@ gtk_spin_button_set_adjustment (GtkSpinButton *spin_button, gtk_signal_connect (GTK_OBJECT (adjustment), "changed", (GtkSignalFunc) adjustment_changed_cb, (gpointer) spin_button); + spin_button->timer_step = spin_button->adjustment->step_increment; } gtk_widget_queue_resize (GTK_WIDGET (spin_button)); - - spin_button->timer_step = spin_button->adjustment->step_increment; } g_object_notify (G_OBJECT (spin_button), "adjustment"); -- cgit v1.2.1