summaryrefslogtreecommitdiff
path: root/gtk/gtkspinbutton.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-09-23 16:14:15 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-09-23 16:14:15 +0000
commita7716c187fe4e6cf212f024c675930b377a8d422 (patch)
tree028d46cbda74100e82c9e907dc6048f59ff25dde /gtk/gtkspinbutton.c
parent5102e76f2b77abb00e1e46477549f21f4c5bd8de (diff)
downloadgtk+-a7716c187fe4e6cf212f024c675930b377a8d422.tar.gz
Patch from Joshua N Pritikin to fix problem where signal connection wasn't
Mon Sep 23 12:12:48 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkspinbutton.c: Patch from Joshua N Pritikin to fix problem where signal connection wasn't removed from adjustment on finalize. (#93962)
Diffstat (limited to 'gtk/gtkspinbutton.c')
-rw-r--r--gtk/gtkspinbutton.c5
1 files changed, 2 insertions, 3 deletions
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");