[anjuta] document-manager: Destroy page with gtk_widget_destroy() instead of gtk_container_remove()
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] document-manager: Destroy page with gtk_widget_destroy() instead of gtk_container_remove()
- Date: Sun, 11 Mar 2012 20:52:28 +0000 (UTC)
commit 547b84fb589e1e01f6f8494b10a0e160f4125a42
Author: Johannes Schmid <jhs gnome org>
Date: Sun Mar 11 21:48:00 2012 +0100
document-manager: Destroy page with gtk_widget_destroy() instead of gtk_container_remove()
This is recommended by the gtk+ documentation to avoid dependency loops.
plugins/document-manager/anjuta-docman.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/plugins/document-manager/anjuta-docman.c b/plugins/document-manager/anjuta-docman.c
index e7c1c3c..67a574f 100644
--- a/plugins/document-manager/anjuta-docman.c
+++ b/plugins/document-manager/anjuta-docman.c
@@ -1083,14 +1083,13 @@ anjuta_docman_remove_document (AnjutaDocman *docman, IAnjutaDocument *doc)
page = anjuta_docman_get_page_for_document (docman, doc);
if (page)
{
- gtk_container_remove (GTK_CONTAINER (docman), page->widget);
docman->priv->pages = g_list_remove (docman->priv->pages, (gpointer)page);
if (!g_list_length (docman->priv->pages))
g_signal_emit (G_OBJECT (docman), docman_signals[DOC_CHANGED], 0, NULL);
g_free (page);
}
+ gtk_widget_destroy(GTK_WIDGET(doc));
anjuta_docman_update_documents_menu(docman);
- g_object_unref (doc);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]