[gtk+/gtk-3-18] Assistant: Fix page rmoval



commit b94ef83239acdc1967e72d027aef150d37466659
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 29 19:21:47 2015 -0400

    Assistant: Fix page rmoval
    
    We have to remove the page itself from the intermediate box
    first, before removing the box from the notebook. Otherwise,
    reffing the page to keep it alive is ineffective: the box
    gets destroyed, and that destruction recurses over the page.
    
    This fixes the problem in
    https://bugzilla.gnome.org/show_bug.cgi?id=756385

 gtk/gtkassistant.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 34a6dd4..98c4a56 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -1466,8 +1466,8 @@ gtk_assistant_remove (GtkContainer *container,
       assistant->priv->content != NULL &&
       gtk_widget_get_parent (box) == assistant->priv->content)
     {
-      container = (GtkContainer *) assistant->priv->content;
-      gtk_container_remove (container, box);
+      gtk_container_remove (GTK_CONTAINER (box), page);
+      gtk_container_remove (GTK_CONTAINER (assistant->priv->content), box);
     }
 }
 


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