[gtk+] accessible: Ensure we unset the widget when finalizing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] accessible: Ensure we unset the widget when finalizing
- Date: Mon, 19 Dec 2011 15:50:52 +0000 (UTC)
commit dbc15813769312db8680bfd670b7befb5bda8b21
Author: Benjamin Otte <otte redhat com>
Date: Sun Dec 18 17:29:31 2011 +0100
accessible: Ensure we unset the widget when finalizing
gtk/gtkaccessible.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkaccessible.c b/gtk/gtkaccessible.c
index bcd6cbb..afca739 100644
--- a/gtk/gtkaccessible.c
+++ b/gtk/gtkaccessible.c
@@ -130,6 +130,16 @@ gtk_accessible_real_widget_unset (GtkAccessible *accessible)
}
static void
+gtk_accessible_finalize (GObject *object)
+{
+ GtkAccessible *accessible = GTK_ACCESSIBLE (object);
+
+ gtk_accessible_set_widget (accessible, NULL);
+
+ G_OBJECT_CLASS (gtk_accessible_parent_class)->finalize (object);
+}
+
+static void
gtk_accessible_class_init (GtkAccessibleClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -142,6 +152,7 @@ gtk_accessible_class_init (GtkAccessibleClass *klass)
atkobject_class->ref_state_set = gtk_accessible_ref_state_set;
gobject_class->get_property = gtk_accessible_get_property;
gobject_class->set_property = gtk_accessible_set_property;
+ gobject_class->finalize = gtk_accessible_finalize;
g_object_class_install_property (gobject_class,
PROP_WIDGET,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]