[sysprof/wip/gtk4-port: 129/132] display: fix removal of pages




commit 023d7424f0ccf45b5f5d0ea07485614ce84fccae
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 1 16:41:59 2021 -0700

    display: fix removal of pages

 src/libsysprof-ui/sysprof-display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libsysprof-ui/sysprof-display.c b/src/libsysprof-ui/sysprof-display.c
index d1cf601b..d2dda551 100644
--- a/src/libsysprof-ui/sysprof-display.c
+++ b/src/libsysprof-ui/sysprof-display.c
@@ -1322,7 +1322,7 @@ _sysprof_display_destroy (SysprofDisplay *self)
 
   g_return_if_fail (SYSPROF_IS_DISPLAY (self));
 
-  if ((parent = gtk_widget_get_parent (GTK_WIDGET (self))) && GTK_IS_NOTEBOOK (parent))
+  if ((parent = gtk_widget_get_ancestor (GTK_WIDGET (self), GTK_TYPE_NOTEBOOK)))
     gtk_notebook_remove_page (GTK_NOTEBOOK (parent),
                               gtk_notebook_page_num (GTK_NOTEBOOK (parent), GTK_WIDGET (self)));
 }


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