[gtk+/font-chooser] Make gtk_container_remove work for assistants



commit ea65a7243e93a8d35fe4659e957294ece27f7928
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 11 22:13:39 2011 -0400

    Make gtk_container_remove work for assistants

 gtk/gtkcontainer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index 55008fd..229fcf6 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -45,6 +45,7 @@
 #include "gtksizerequest.h"
 #include "gtkwidgetprivate.h"
 #include "gtkwindow.h"
+#include "gtkassistant.h"
 #include "gtkintl.h"
 #include "a11y/gtkcontaineraccessible.h"
 
@@ -1531,7 +1532,7 @@ gtk_container_remove (GtkContainer *container,
 {
   g_return_if_fail (GTK_IS_CONTAINER (container));
   g_return_if_fail (GTK_IS_WIDGET (widget));
-  g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (container));
+  g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (container) || GTK_IS_ASSISTANT (container));
 
   g_signal_emit (container, container_signals[REMOVE], 0, widget);
 }



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