diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-07-17 19:35:37 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-07-17 19:35:37 -0400 |
commit | 095ea8461195e343912e2ad92d167d98fc6a21a3 (patch) | |
tree | bb0681201131c10d4dd61011d96f07d592cb7c06 /gtk/gtkassistant.c | |
parent | e756b2e50dcee82855b0cbe7af6aa3873d1ecfa8 (diff) | |
download | gtk+-095ea8461195e343912e2ad92d167d98fc6a21a3.tar.gz |
Make destroying assistants work again
During destruction, we need to be careful to not ask the content
notebook to remove itself from itself.
Diffstat (limited to 'gtk/gtkassistant.c')
-rw-r--r-- | gtk/gtkassistant.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c index 0bed0d56e1..c0f72a6ee9 100644 --- a/gtk/gtkassistant.c +++ b/gtk/gtkassistant.c @@ -1300,9 +1300,12 @@ gtk_assistant_remove (GtkContainer *container, { GtkAssistant *assistant = (GtkAssistant*) container; - /* Forward this removal to the content notebook. */ - container = (GtkContainer *) assistant->priv->content; - gtk_container_remove (container, page); + /* Forward this removal to the content notebook */ + if (gtk_widget_get_parent (page) == assistant->priv->content) + { + container = (GtkContainer *) assistant->priv->content; + gtk_container_remove (container, page); + } } /** @@ -1668,7 +1671,7 @@ gtk_assistant_remove_page (GtkAssistant *assistant, page = gtk_assistant_get_nth_page (assistant, page_num); if (page) - gtk_assistant_remove (assistant, page); + gtk_assistant_remove (GTK_CONTAINER (assistant), page); } /** |