[gtk/wip/baedert/for-master] container: Stop implementing destroy()



commit 71744bc5a01d31b0845806cf901e801dddcf83ad
Author: Timm Bäder <mail baedert org>
Date:   Wed Oct 2 13:23:07 2019 +0200

    container: Stop implementing destroy()

 gtk/gtkcontainer.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index bbc6968bdf..4b89b6b8a3 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -100,7 +100,7 @@ enum {
 };
 
 /* --- prototypes --- */
-static void     gtk_container_destroy              (GtkWidget         *widget);
+static void     gtk_container_dispose              (GObject           *object);
 static void     gtk_container_add_unimplemented    (GtkContainer      *container,
                                                     GtkWidget         *widget);
 static void     gtk_container_remove_unimplemented (GtkContainer      *container,
@@ -139,7 +139,8 @@ gtk_container_class_init (GtkContainerClass *class)
   vadjustment_key_id = g_quark_from_static_string ("gtk-vadjustment");
   hadjustment_key_id = g_quark_from_static_string ("gtk-hadjustment");
 
-  widget_class->destroy = gtk_container_destroy;
+  gobject_class->dispose = gtk_container_dispose;
+
   widget_class->compute_expand = gtk_container_compute_expand;
   widget_class->get_request_mode = gtk_container_get_request_mode;
 
@@ -242,9 +243,9 @@ gtk_container_init (GtkContainer *container)
 }
 
 static void
-gtk_container_destroy (GtkWidget *widget)
+gtk_container_dispose (GObject *object)
 {
-  GtkContainer *container = GTK_CONTAINER (widget);
+  GtkContainer *container = GTK_CONTAINER (object);
   GtkContainerPrivate *priv = gtk_container_get_instance_private (container);
 
   if (priv->restyle_pending)
@@ -252,7 +253,7 @@ gtk_container_destroy (GtkWidget *widget)
 
   gtk_container_foreach (container, (GtkCallback) gtk_widget_destroy, NULL);
 
-  GTK_WIDGET_CLASS (gtk_container_parent_class)->destroy (widget);
+  G_OBJECT_CLASS (gtk_container_parent_class)->dispose (object);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]