[gtk/wip/baedert/for-master: 86/97] popovermenubar: Avoid calling gtk_widget_destroy()



commit 6bcc87a65a8b86e8d51a9f2fa4f0d4328ae382ee
Author: Timm Bäder <mail baedert org>
Date:   Thu Feb 20 19:26:44 2020 +0100

    popovermenubar: Avoid calling gtk_widget_destroy()

 gtk/gtkpopovermenubar.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkpopovermenubar.c b/gtk/gtkpopovermenubar.c
index 411d4c0358..bf9077219c 100644
--- a/gtk/gtkpopovermenubar.c
+++ b/gtk/gtkpopovermenubar.c
@@ -369,7 +369,7 @@ tracker_remove (gint     position,
     {
       if (i == position)
         {
-          gtk_widget_destroy (child);
+          gtk_widget_unparent (child);
           break;
         }
     }
@@ -479,7 +479,7 @@ gtk_popover_menu_bar_dispose (GObject *object)
   g_clear_object (&bar->model);
 
   while ((child = gtk_widget_get_first_child (GTK_WIDGET (bar))))
-    gtk_widget_destroy (child);
+    gtk_widget_unparent (child);
 
   G_OBJECT_CLASS (gtk_popover_menu_bar_parent_class)->dispose (object);
 }
@@ -650,7 +650,7 @@ gtk_popover_menu_bar_set_menu_model (GtkPopoverMenuBar *bar,
       GtkActionMuxer *muxer;
 
       while ((child = gtk_widget_get_first_child (GTK_WIDGET (bar))))
-        gtk_widget_destroy (child);
+        gtk_widget_unparent (child);
 
       g_clear_pointer (&bar->tracker, gtk_menu_tracker_free);
 


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