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



commit 763b14898b3bb4c4da922c7887e9d63b66fc35bc
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 c1c6a1704f..71487ef30a 100644
--- a/gtk/gtkpopovermenubar.c
+++ b/gtk/gtkpopovermenubar.c
@@ -373,7 +373,7 @@ tracker_remove (gint     position,
     {
       if (i == position)
         {
-          gtk_widget_destroy (child);
+          gtk_widget_unparent (child);
           break;
         }
     }
@@ -483,7 +483,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);
 }
@@ -654,7 +654,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]