diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-11-21 17:04:35 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-11-21 17:04:35 +0000 |
commit | c860866dd794b8abb0d185802d0a0dd17c5005ac (patch) | |
tree | 66eefe3e2b8cc52c655b072caa1be719ab7fa388 /gtk/gtkobject.c | |
parent | d5db986a0b11b2cb7ca4fb93a2d2d40c371d5cf2 (diff) | |
download | gtk+-c860866dd794b8abb0d185802d0a0dd17c5005ac.tar.gz |
Ref-sink the tooltips object. Ref-sink the tooltips object. Fix some
Wed Nov 21 11:41:29 2001 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_tooltips): Ref-sink the tooltips object.
* gtk/gtktoolbar.c (gtk_toolbar_init): Ref-sink the tooltips object.
* gtk/gtkfilesel.c (open_new_dir): Fix some constness warnings.
* gtk/gtkaccelgroup.c: Rename gtk_accel_groups_from_acceleratable()
back to gtk_accel_groups_from_object(), change @acceleratable
parameter to gtk_accel_groups_activate() accordingly.
* gtk/gtkaccelmap.c (gtk_accel_map_lookup_entry): Remove
left-over comment about quark return.
* gtk/gtkaccelmap.h: Fix spelling of gtk_accel_map_foreach_unfiltered().
* gtk/gtk-boxed.defs (GtkIconSource): added as a boxed type.
(Patch from Matt Wilson)
* gtk/gtkobject.c (gtk_object_finalize): Warn if a floating
object is finalized.
Diffstat (limited to 'gtk/gtkobject.c')
-rw-r--r-- | gtk/gtkobject.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c index 0c47368369..70e1eda4a7 100644 --- a/gtk/gtkobject.c +++ b/gtk/gtkobject.c @@ -389,6 +389,15 @@ gtk_object_finalize (GObject *gobject) { GtkObject *object = GTK_OBJECT (gobject); + if (GTK_OBJECT_FLOATING (object)) + { + g_warning ("A floating object was finalized. This means that someone\n" + "called g_object_unref() on an object that had only a floating\n" + "reference; the initial floating reference is not owned by anyone\n" + "and must be removed with gtk_object_sink() after a normal\n" + "reference is obtained with g_object_ref()."); + } + gtk_object_notify_weaks (object); G_OBJECT_CLASS (parent_class)->finalize (gobject); |