[gtk/wip/baedert/for-master: 37/66] popovermenu: Avoid a gtk_widget_destroy() call



commit 73faa9c84afc90318b3098062f1270230a580808
Author: Timm Bäder <mail baedert org>
Date:   Thu Feb 20 18:05:00 2020 +0100

    popovermenu: Avoid a gtk_widget_destroy() call

 gtk/gtkpopovermenu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkpopovermenu.c b/gtk/gtkpopovermenu.c
index 584a5c5f14..d9779bd2f7 100644
--- a/gtk/gtkpopovermenu.c
+++ b/gtk/gtkpopovermenu.c
@@ -604,7 +604,7 @@ gtk_popover_menu_set_menu_model (GtkPopoverMenu *popover,
 
       stack = gtk_bin_get_child (GTK_BIN (popover));
       while ((child = gtk_widget_get_first_child (stack)))
-        gtk_widget_destroy (child);
+        gtk_container_remove (GTK_CONTAINER (stack), child);
 
       if (model)
         gtk_menu_section_box_new_toplevel (popover, model, popover->flags);


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