[anjuta/newproject] Avoid using g_object_force_floating
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/newproject] Avoid using g_object_force_floating
- Date: Sun, 24 Oct 2010 21:01:41 +0000 (UTC)
commit 6073c77fd51c8fc914508ba8472ae54328419c95
Author: Sébastien Granjoux <seb sfo free fr>
Date: Sun Oct 24 19:56:19 2010 +0200
Avoid using g_object_force_floating
libanjuta/anjuta-project.c | 10 ++++++++--
plugins/am-project/am-project.c | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/libanjuta/anjuta-project.c b/libanjuta/anjuta-project.c
index 1a49923..d0e89b4 100644
--- a/libanjuta/anjuta-project.c
+++ b/libanjuta/anjuta-project.c
@@ -400,6 +400,14 @@ anjuta_project_node_insert_after (AnjutaProjectNode *parent, AnjutaProjectNode *
return node;
}
+/**
+ * anjuta_project_node_remove:
+ * @parent:
+ * @sibling: (allow-none) (transfer none):
+ * @node: (transfer none):
+ *
+ * Returns: (transfer full):
+ */
AnjutaProjectNode *
anjuta_project_node_remove (AnjutaProjectNode *node)
{
@@ -416,8 +424,6 @@ anjuta_project_node_remove (AnjutaProjectNode *node)
node->next = NULL;
}
node->prev = NULL;
-
- g_object_force_floating (node);
return node;
}
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index ed821ed..c821e59 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -979,9 +979,9 @@ project_load_target (AmpProject *project, AnjutaToken *name, AnjutaTokenType tok
/* Copy all sources */
while ((child = anjuta_project_node_first_child (ANJUTA_PROJECT_NODE (orphan))) != NULL)
{
- /* Add a reference on the child to avoid freeing it */
anjuta_project_node_remove (child);
anjuta_project_node_append (target, child);
+ g_object_unref (child);
}
g_free (orig_key);
amp_target_free (orphan);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]