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



commit 103b6a9205740388c603cd6db33208d097180031
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 00362a11e4..5adec80cba 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;
         }
     }
@@ -480,7 +480,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);
 }
@@ -651,7 +651,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]