[sysprof/wip/gtk4-port: 68/131] tab: use dispose to destroy display




commit 8d0f2507ff7ead6f3f19e43fe8608b0bfa4e0b0f
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 1 10:26:19 2021 -0700

    tab: use dispose to destroy display

 src/libsysprof-ui/sysprof-tab.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-tab.c b/src/libsysprof-ui/sysprof-tab.c
index 864aba27..fa76ef8f 100644
--- a/src/libsysprof-ui/sysprof-tab.c
+++ b/src/libsysprof-ui/sysprof-tab.c
@@ -22,7 +22,7 @@
 
 #include "config.h"
 
-#include "sysprof-display.h"
+#include "sysprof-display-private.h"
 #include "sysprof-tab.h"
 #include "sysprof-ui-private.h"
 
@@ -62,18 +62,18 @@ sysprof_tab_close_clicked (SysprofTab *self,
   g_assert (SYSPROF_IS_TAB (self));
   g_assert (GTK_IS_BUTTON (button));
 
-  if (self->display != NULL)
-    gtk_widget_destroy (GTK_WIDGET (self->display));
+  if (self->display)
+    _sysprof_display_destroy (self->display);
 }
 
 static void
-sysprof_tab_finalize (GObject *object)
+sysprof_tab_dispose (GObject *object)
 {
   SysprofTab *self = (SysprofTab *)object;
 
   g_clear_weak_pointer (&self->display);
 
-  G_OBJECT_CLASS (sysprof_tab_parent_class)->finalize (object);
+  G_OBJECT_CLASS (sysprof_tab_parent_class)->dispose (object);
 }
 
 static void
@@ -122,7 +122,7 @@ sysprof_tab_class_init (SysprofTabClass *klass)
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
-  object_class->finalize = sysprof_tab_finalize;
+  object_class->dispose = sysprof_tab_dispose;
   object_class->get_property = sysprof_tab_get_property;
   object_class->set_property = sysprof_tab_set_property;
 


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