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



commit 38d14d8f794741d62e1db0e0216d73df54910511
Author: Timm Bäder <mail baedert org>
Date:   Wed Oct 2 13:19:52 2019 +0200

    notebook: Stop implementing destroy()

 gtk/gtknotebook.c | 40 ++++++++++++++--------------------------
 1 file changed, 14 insertions(+), 26 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 2082a1038a..11ebcc9547 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -680,7 +680,6 @@ static void gtk_notebook_finalize            (GObject         *object);
 static void gtk_notebook_dispose             (GObject         *object);
 
 /*** GtkWidget Methods ***/
-static void gtk_notebook_destroy             (GtkWidget        *widget);
 static void gtk_notebook_unmap               (GtkWidget        *widget);
 static gboolean gtk_notebook_popup_menu      (GtkWidget        *widget);
 static void gtk_notebook_motion              (GtkEventController *controller,
@@ -958,7 +957,6 @@ gtk_notebook_class_init (GtkNotebookClass *class)
   gobject_class->finalize = gtk_notebook_finalize;
   gobject_class->dispose = gtk_notebook_dispose;
 
-  widget_class->destroy = gtk_notebook_destroy;
   widget_class->unmap = gtk_notebook_unmap;
   widget_class->popup_menu = gtk_notebook_popup_menu;
   widget_class->grab_notify = gtk_notebook_grab_notify;
@@ -1824,7 +1822,6 @@ gtk_notebook_get_property (GObject         *object,
 
 /* Private GtkWidget Methods :
  *
- * gtk_notebook_destroy
  * gtk_notebook_map
  * gtk_notebook_unmap
  * gtk_notebook_snapshot
@@ -1849,29 +1846,6 @@ remove_switch_tab_timer (GtkNotebook *notebook)
     }
 }
 
-static void
-gtk_notebook_destroy (GtkWidget *widget)
-{
-  GtkNotebook *notebook = GTK_NOTEBOOK (widget);
-  GtkNotebookPrivate *priv = notebook->priv;
-
-  if (priv->pages)
-    g_list_model_items_changed (G_LIST_MODEL (priv->pages), 0, g_list_length (priv->children), 0);
-
-  if (priv->menu)
-    gtk_notebook_popup_disable (notebook);
-
-  if (priv->source_targets)
-    {
-      gdk_content_formats_unref (priv->source_targets);
-      priv->source_targets = NULL;
-    }
-
-  remove_switch_tab_timer (notebook);
-
-  GTK_WIDGET_CLASS (gtk_notebook_parent_class)->destroy (widget);
-}
-
 static void
 gtk_notebook_finalize (GObject *object)
 {
@@ -1899,6 +1873,20 @@ gtk_notebook_dispose (GObject *object)
       gtk_notebook_remove (GTK_CONTAINER (notebook), page->child);
     }
 
+  if (priv->pages)
+    g_list_model_items_changed (G_LIST_MODEL (priv->pages), 0, g_list_length (priv->children), 0);
+
+  if (priv->menu)
+    gtk_notebook_popup_disable (notebook);
+
+  if (priv->source_targets)
+    {
+      gdk_content_formats_unref (priv->source_targets);
+      priv->source_targets = NULL;
+    }
+
+  remove_switch_tab_timer (notebook);
+
   G_OBJECT_CLASS (gtk_notebook_parent_class)->dispose (object);
 }
 


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