[anjuta/newproject] Use a standard Glist to keep project node properties



commit f53a2142e1c1e0e7f65b9ddeaa8f74c2b3e8e53a
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Fri Sep 24 19:42:45 2010 +0200

    Use a standard Glist to keep project node properties

 libanjuta/anjuta-project.c              |  319 ++++++-------------------------
 libanjuta/anjuta-project.h              |   35 ++--
 plugins/am-project/ac-writer.c          |    5 +-
 plugins/am-project/am-node.c            |   30 ++--
 plugins/am-project/am-project-private.h |    4 +-
 plugins/am-project/am-project.c         |   34 ++--
 plugins/am-project/am-properties.c      |  110 +++++------
 plugins/am-project/projectparser.c      |   29 ++--
 plugins/dir-project/dir-node.c          |    9 +-
 plugins/project-manager/dialogs.c       |   50 +++---
 plugins/project-manager/plugin.c        |    2 +-
 11 files changed, 209 insertions(+), 418 deletions(-)
---
diff --git a/libanjuta/anjuta-project.c b/libanjuta/anjuta-project.c
index 2496a9c..f4d098b 100644
--- a/libanjuta/anjuta-project.c
+++ b/libanjuta/anjuta-project.c
@@ -53,148 +53,6 @@
 #define NODE_DATA(node)  node
 #define PROXY_DATA(node)  ((node) != NULL ? (AnjutaProjectProxyData *)((node)->data) : NULL)
 
-/* Properties functions
- *---------------------------------------------------------------------------*/
-
-/* Properties functions
- *---------------------------------------------------------------------------*/
-
-AnjutaProjectProperty *
-anjuta_project_property_next (AnjutaProjectProperty *list)
-{
-	return g_list_next (list);
-}
-
-AnjutaProjectPropertyInfo *
-anjuta_project_property_get_info (AnjutaProjectProperty *property)
-{
-	return (AnjutaProjectPropertyInfo *)property->data;
-}
-
-AnjutaProjectPropertyInfo *
-anjuta_project_property_lookup (AnjutaProjectProperty *list, AnjutaProjectProperty *prop)
-{
-	AnjutaProjectPropertyInfo *info;
-	
-	for (; list != NULL; list = g_list_next (list))
-	{
-		info = (AnjutaProjectPropertyInfo *)list->data;
-		
-		if (info->override == NULL)
-		{
-			info = NULL;
-			break;
-		}
-		else if (info->override == prop)
-		{
-			break;
-		}
-		info = NULL;
-	}
-
-	return info;
-}
-
-AnjutaProjectProperty *
-anjuta_project_property_override (AnjutaProjectProperty *list, AnjutaProjectProperty *prop)
-{
-	AnjutaProjectProperty *item;
-	
-	for (item = list; item != NULL; item = g_list_next (item))
-	{
-		AnjutaProjectPropertyInfo *info;
-	
-		info = (AnjutaProjectPropertyInfo *)item->data;
-		
-		if (info->override == NULL)
-		{
-			item = NULL;
-			break;
-		}
-		else if (info->override == prop)
-		{
-			break;
-		}
-	}
-
-	return item;
-}
-
-AnjutaProjectProperty *
-anjuta_project_property_next_item (AnjutaProjectProperty *item)
-{
-	AnjutaProjectProperty *prop = ((AnjutaProjectPropertyInfo *)item->data)->override;
-
-	for (item = g_list_next (item); item != NULL; item = g_list_next (item))
-	{
-		AnjutaProjectPropertyInfo *info;
-	
-		info = (AnjutaProjectPropertyInfo *)item->data;
-		
-		if (info->override == NULL)
-		{
-			item = NULL;
-			break;
-		}
-		else if (info->override == prop)
-		{
-			break;
-		}
-	}
-
-	return item;
-}
-
-AnjutaProjectProperty *
-anjuta_project_property_insert (AnjutaProjectProperty *list, AnjutaProjectProperty *prop, AnjutaProjectPropertyInfo *info)
-{
-	GList *next;
-	
-	if (info->name == NULL) info->name = ((AnjutaProjectPropertyInfo *)prop->data)->name;
-	info->type = ((AnjutaProjectPropertyInfo *)prop->data)->type;
-	info->override = prop;
-
-	next = ((AnjutaProjectPropertyInfo *)list->data)->override;
-	if (next != NULL)
-	{
-		next = list;
-	}
-	list = g_list_prepend (next, info);
-	
-	return list;
-}
-
-AnjutaProjectProperty *
-anjuta_project_property_remove (AnjutaProjectProperty *list, AnjutaProjectProperty *prop)
-{
-	AnjutaProjectPropertyInfo *info;
-	GList *link;
-	
-	for (link = list; link != NULL; link = g_list_next (link))
-	{
-		info = (AnjutaProjectPropertyInfo *)link->data;
-		if (info->override == NULL)
-		{
-			break;
-		}
-		else if ((info == prop->data) || (info->override == prop))
-		{
-			list = g_list_delete_link (list, link);
-			if (list == NULL) list = info->override;
-			break;
-		}
-	}
-	
-	return list;
-}
-
-void
-anjuta_project_property_foreach (AnjutaProjectProperty *list, GFunc func, gpointer user_data)
-{
-	g_list_foreach (list, func, user_data);
-}
-
-
 /* Node access functions
  *---------------------------------------------------------------------------*/
 
@@ -724,100 +582,60 @@ anjuta_project_node_get_file (AnjutaProjectNode *node)
 	return NODE_DATA (node)->file;
 }
 
-AnjutaProjectProperty *
-anjuta_project_node_first_property (AnjutaProjectNode *node)
+GList *
+anjuta_project_node_get_custom_properties (AnjutaProjectNode *node)
 {
-	GList *first;
-
-	/* Get properties list */
-	first = g_list_first (NODE_DATA (node)->properties);
-	if (first != NULL)
-	{
-		AnjutaProjectPropertyInfo *info = (AnjutaProjectPropertyInfo *)first->data;
-
-		if (info->override == NULL)
-		{
-			first = NULL;
-		}
-	}
-
-	return first;
+	return NODE_DATA (node)->custom_properties;
 }
 
-AnjutaProjectProperty *
-anjuta_project_node_first_valid_property (AnjutaProjectNode *node)
+GList *
+anjuta_project_node_get_native_properties (AnjutaProjectNode *node)
 {
-	GList *first;
+	return NODE_DATA (node)->native_properties;
+}
 
-	/* Get properties list */
-	first = g_list_first (NODE_DATA (node)->properties);
-	if (first != NULL)
-	{
-		AnjutaProjectPropertyInfo *info = (AnjutaProjectPropertyInfo *)first->data;
+static
+find_property (gpointer item, gpointer data)
+{
+	AnjutaProjectProperty *prop_a = (AnjutaProjectProperty *)item;
+	AnjutaProjectProperty *prop_b = (AnjutaProjectProperty *)data;
 
-		if (info->override != NULL)
-		{
-			first = g_list_first (info->override);
-		}
-	}
+	if (prop_a->native != NULL) prop_a = prop_a->native;
+	if (prop_b->native != NULL) prop_b = prop_b->native;
 
-	return first;
+	return prop_a != prop_b;
 }
 
 AnjutaProjectProperty *
 anjuta_project_node_get_property (AnjutaProjectNode *node, AnjutaProjectProperty *property)
 {
-	GList *item;
-	AnjutaProjectPropertyInfo *info;
-	
-	/* Get main property */
-	info = (AnjutaProjectPropertyInfo *)property->data;
-	if (info->override != NULL) property = info->override;
-	
-	/* Get properties list */
-	item = g_list_first (NODE_DATA (node)->properties);
+	GList *found;
 
-	for (; item != NULL; item = g_list_next (item))
-	{
-		info = (AnjutaProjectPropertyInfo *)item->data;
+	/* Search in custom properties */
+	found = g_list_find_custom (node->custom_properties, property, find_property);
 
-		if (info->override == NULL)
-		{
-			item = NULL;
-			break;
-		}
-		
-		if (info->override == property)
-		{
-			break;
-		}
+	if (found == NULL)
+	{
+		/* Search in native properties */
+		found = g_list_find_custom (node->custom_properties, property, find_property);
 	}
 
-	return item;
+	return found != NULL ? (AnjutaProjectProperty *)found->data : NULL;
 }
 
 AnjutaProjectProperty *
-anjuta_project_node_insert_property (AnjutaProjectNode *node, AnjutaProjectProperty *frame, AnjutaProjectProperty *property)
+anjuta_project_node_insert_property (AnjutaProjectNode *node, AnjutaProjectProperty *native, AnjutaProjectProperty *property)
 {
-	GList **list;
-	GList *next;
-	AnjutaProjectPropertyInfo *info;
-
+	/* Make sure the property is native */
+	if (native->native != NULL) native = native->native;
+	
 	/* Fill missing information */
-	info = (AnjutaProjectPropertyInfo *)property->data;
-	if (info->name == NULL) info->name = ((AnjutaProjectPropertyInfo *)frame->data)->name;
-	info->type = ((AnjutaProjectPropertyInfo *)frame->data)->type;
-	info->override = frame;
+	if (property->name == NULL) property->name = native->name;
+	property->type = native->type;
+	property->native = native;
 
 	/* Get properties list */
-	list = &(NODE_DATA (node)->properties);
-
-	next = ((AnjutaProjectPropertyInfo *)(*list)->data)->override;
-	if (next != NULL)
-	{
-		next = *list;
-	}
-	*list = g_list_concat (next, property);
+	node->custom_properties = g_list_append (node->custom_properties, property);
 	
 	return property;
 }
@@ -825,29 +643,23 @@ anjuta_project_node_insert_property (AnjutaProjectNode *node, AnjutaProjectPrope
 AnjutaProjectProperty *
 anjuta_project_node_remove_property (AnjutaProjectNode *node, AnjutaProjectProperty *prop)
 {
-	AnjutaProjectPropertyInfo *info;
-
-	info = (AnjutaProjectPropertyInfo *)prop->data;
+	GList *found;
+	AnjutaProjectProperty *removed = NULL;
 
-	if (info->override != NULL)
+	/* Search the exact property, useful for list property */
+	found = g_list_find (node->custom_properties, prop);
+	if (found == NULL)
 	{
-		GList *list;
-		
-		list = NODE_DATA (node)->properties;
-
-		list = g_list_remove_link (list, prop);
-		if (list == NULL)
-		{
-			list = g_list_first (info->override);
-		}
-		NODE_DATA (node)->properties = list;
+		found = g_list_find_custom (node->custom_properties, prop, find_property);
 	}
-	else
+
+	if (found != NULL)
 	{
-		prop = NULL;
+		removed = (AnjutaProjectProperty *)found->data;
+		node->custom_properties = g_list_delete_link (node->custom_properties, found);
 	}
-	
-	return prop;
+
+	return removed;
 }
 
 
@@ -1051,7 +863,8 @@ anjuta_project_node_init (AnjutaProjectNode *node)
 	
 	node->type = 0;
 	node->state = 0;
-	node->properties = NULL;
+	node->native_properties = NULL;
+	node->custom_properties = NULL;
 	node->file = NULL;
 	node->name = NULL;
 }
@@ -1273,6 +1086,7 @@ anjuta_project_proxy_new (AnjutaProjectNode *node)
 	}
 #endif	
 	AnjutaProjectProxyNode *proxy;
+	GList *item;
 	
 	/* If the node is already a proxy get original node */
 	node = anjuta_project_proxy_get_node (node);
@@ -1286,26 +1100,18 @@ anjuta_project_proxy_new (AnjutaProjectNode *node)
 	proxy->base.name = g_strdup (node->name);
 		
 	/* Shallow copy of all properties */
-	if ((node->properties == NULL) || (((AnjutaProjectPropertyInfo *)node->properties->data)->override == NULL))
+	proxy->base.custom_properties = g_list_copy (node->custom_properties);
+	for (item = g_list_first (proxy->base.custom_properties); item != NULL; item = g_list_next (item))
 	{
-		proxy->base.properties = node->properties;
-	}
-	else
-	{
-		GList *item;
-		proxy->base.properties = g_list_copy (node->properties);
-		for (item = g_list_first (proxy->base.properties); item != NULL; item = g_list_next (item))
-		{
-			AnjutaProjectPropertyInfo *info = (AnjutaProjectPropertyInfo *)item->data;
-			AnjutaProjectPropertyInfo *new_info;
-
-			new_info = g_slice_new0(AnjutaProjectPropertyInfo);
-			new_info->name = g_strdup (info->name);
-			new_info->type = info->type;
-			new_info->value = g_strdup (info->value);
-			new_info->override = info->override;
-			item->data = new_info;
-		}
+		AnjutaProjectProperty *prop = (AnjutaProjectProperty *)item->data;
+		AnjutaProjectProperty *new_prop;
+
+		new_prop = g_slice_new0(AnjutaProjectProperty);
+		new_prop->name = g_strdup (prop->name);
+		new_prop->type = prop->type;
+		new_prop->value = g_strdup (prop->value);
+		new_prop->native = prop->native;
+		item->data = new_prop;
 	}
 	
 	return ANJUTA_PROJECT_NODE (proxy);
@@ -1365,7 +1171,7 @@ reparent_children (AnjutaProjectNode *node, gpointer data)
 static void
 free_node_property (gpointer data, gpointer user_data)
 {
-	g_slice_free (AnjutaProjectPropertyInfo, data);
+	g_slice_free (AnjutaProjectProperty, data);
 }
 
 AnjutaProjectNode *
@@ -1401,12 +1207,9 @@ anjuta_project_proxy_exchange (AnjutaProjectNode *proxy, AnjutaProjectNode *node
 	anjuta_project_node_children_foreach (node, reparent_children, node);
 	
 	/* Delete node temporary properties */
-	if ((node->properties != NULL) && (((AnjutaProjectPropertyInfo *)node->properties->data)->override != NULL))
-	{
-		g_list_foreach (node->properties, free_node_property, NULL);
-	}
-	node->properties = proxy->properties;
-	proxy->properties = NULL;
+	g_list_foreach (node->custom_properties, free_node_property, NULL);
+	node->custom_properties = proxy->custom_properties;
+	proxy->custom_properties = NULL;
 	
 #if 0	
 	AnjutaProjectNodeData *data;
diff --git a/libanjuta/anjuta-project.h b/libanjuta/anjuta-project.h
index d5bf7ff..19cf3ed 100644
--- a/libanjuta/anjuta-project.h
+++ b/libanjuta/anjuta-project.h
@@ -105,15 +105,15 @@ typedef enum
 	ANJUTA_PROJECT_PROPERTY_LIST
 } AnjutaProjectValueType;
 
-typedef struct
+typedef struct _AnjutaProjectProperty AnjutaProjectProperty;
+
+struct _AnjutaProjectProperty
 {
 	gchar *name;
 	AnjutaProjectValueType type;
 	gchar *value;
-	GList *override;
-} AnjutaProjectPropertyInfo;
-
-typedef GList AnjutaProjectProperty;
+	AnjutaProjectProperty *native;
+};
 
 #define ANJUTA_IS_PROJECT_PROPERTY
 
@@ -158,8 +158,9 @@ struct _AnjutaProjectNode
 	
 	AnjutaProjectNodeType type;
 	AnjutaProjectNodeState state;
-	
-	AnjutaProjectProperty *properties;
+
+	GList *native_properties;
+	GList *custom_properties;
 	GFile *file;
 	gchar *name;
 };
@@ -175,15 +176,6 @@ struct _AnjutaProjectNodeClass
 GType      anjuta_project_node_get_type (void) G_GNUC_CONST;
 
 
-AnjutaProjectProperty *anjuta_project_property_next (AnjutaProjectProperty *list);
-AnjutaProjectProperty *anjuta_project_property_override (AnjutaProjectProperty *list, AnjutaProjectProperty *prop);
-AnjutaProjectProperty *anjuta_project_property_next_item (AnjutaProjectProperty *item);
-AnjutaProjectPropertyInfo *anjuta_project_property_get_info (AnjutaProjectProperty *list);
-AnjutaProjectPropertyInfo *anjuta_project_property_lookup (AnjutaProjectProperty *list, AnjutaProjectProperty *prop);
-AnjutaProjectProperty *anjuta_project_property_insert (AnjutaProjectProperty *list, AnjutaProjectProperty *prop, AnjutaProjectPropertyInfo *info);
-AnjutaProjectProperty *anjuta_project_property_remove (AnjutaProjectProperty *list, AnjutaProjectProperty *prop);
-void anjuta_project_property_foreach (AnjutaProjectProperty *list, GFunc func, gpointer user_data);
-
 
 AnjutaProjectNode *anjuta_project_node_parent (AnjutaProjectNode *node);
 AnjutaProjectNode *anjuta_project_node_first_child (AnjutaProjectNode *node);
@@ -216,11 +208,16 @@ gchar *anjuta_project_node_get_name (const AnjutaProjectNode *node);
 gchar *anjuta_project_node_get_uri (AnjutaProjectNode *node);
 GFile *anjuta_project_node_get_file (AnjutaProjectNode *node);
 
-AnjutaProjectProperty *anjuta_project_node_first_property (AnjutaProjectNode *node);
-AnjutaProjectProperty *anjuta_project_node_first_valid_property (AnjutaProjectNode *node);
+//AnjutaProjectProperty *anjuta_project_node_first_property (AnjutaProjectNode *node);
+//AnjutaProjectProperty *anjuta_project_node_first_valid_property (AnjutaProjectNode *node);
+GList *anjuta_project_node_get_native_properties (AnjutaProjectNode *node);
+GList *anjuta_project_node_get_custom_properties (AnjutaProjectNode *node);
 AnjutaProjectProperty *anjuta_project_node_get_property (AnjutaProjectNode *node, AnjutaProjectProperty *property);
-AnjutaProjectProperty *anjuta_project_node_insert_property (AnjutaProjectNode *node, AnjutaProjectProperty *frame, AnjutaProjectProperty *property);
+AnjutaProjectProperty *anjuta_project_node_insert_property (AnjutaProjectNode *node, AnjutaProjectProperty *native, AnjutaProjectProperty *property);
 AnjutaProjectProperty *anjuta_project_node_remove_property (AnjutaProjectNode *node, AnjutaProjectProperty *property);
+
+
+
 //const gchar *anjuta_project_node_get_property_value (AnjutaProjectNode *node, AnjutaProjectProperty prop);
 
 AnjutaProjectNode *anjuta_project_group_get_node_from_file (const AnjutaProjectNode *root, GFile *directory);
diff --git a/plugins/am-project/ac-writer.c b/plugins/am-project/ac-writer.c
index 0525707..7e9a5ff 100644
--- a/plugins/am-project/ac-writer.c
+++ b/plugins/am-project/ac-writer.c
@@ -127,10 +127,9 @@ amp_project_update_property (AmpProject *project, AnjutaProjectProperty *propert
 	AnjutaToken *arg;
 	guint pos;
 	const gchar *value;
-	AmpPropertyInfo *info = (AmpPropertyInfo *)anjuta_project_property_get_info (property);
 
-	pos = info->position;
-	value = info->base.value;
+	pos = ((AmpProperty *)property)->position;
+	value = ((AmpProperty *)property)->base.value;
 	
 	if (project->ac_init == NULL)
 	{
diff --git a/plugins/am-project/am-node.c b/plugins/am-project/am-node.c
index 39158c9..a6a2a3a 100644
--- a/plugins/am-project/am-node.c
+++ b/plugins/am-project/am-node.c
@@ -120,7 +120,8 @@ amp_root_new (GFile *file, GError **error)
 
 	root = g_object_new (ANJUTA_TYPE_AM_ROOT_NODE, NULL);
 	root->base.type = ANJUTA_PROJECT_ROOT;
-	root->base.properties = amp_get_project_property_list();
+	root->base.native_properties = amp_get_project_property_list();
+	root->base.custom_properties = NULL;
 	root->base.file = g_file_dup (file);
 	root->base.name = NULL;
 	root->base.state = ANJUTA_PROJECT_CAN_ADD_GROUP |
@@ -172,7 +173,7 @@ anjuta_am_root_node_finalize (GObject *object)
 	AnjutaAmRootNode *root = ANJUTA_AM_ROOT_NODE (object);
 
 	if (root->configure_file != NULL) anjuta_token_file_free (root->configure_file);
-	amp_property_free (root->base.properties);
+	g_list_foreach (root->base.custom_properties, (GFunc)amp_property_free, NULL);
 	
 	G_OBJECT_CLASS (anjuta_am_root_node_parent_class)->finalize (object);
 }
@@ -198,7 +199,8 @@ amp_module_new (AnjutaToken *token, GError **error)
 
 	module = g_object_new (ANJUTA_TYPE_AM_MODULE_NODE, NULL);
 	module->base.type = ANJUTA_PROJECT_MODULE;
-	module->base.properties = amp_get_module_property_list();
+	module->base.native_properties = amp_get_module_property_list();
+	module->base.custom_properties = NULL;
 	module->base.file = NULL;
 	module->base.name = anjuta_token_evaluate (token);
 	module->base.state = ANJUTA_PROJECT_CAN_ADD_PACKAGE |
@@ -236,7 +238,7 @@ anjuta_am_module_node_finalize (GObject *object)
 {
 	AnjutaAmModuleNode *module = ANJUTA_AM_MODULE_NODE (object);
 
-	amp_property_free (module->base.properties);
+	g_list_foreach (module->base.custom_properties, (GFunc)amp_property_free, NULL);
 	
 	G_OBJECT_CLASS (anjuta_am_module_node_parent_class)->finalize (object);
 }
@@ -262,7 +264,8 @@ amp_package_new (const gchar *name, GError **error)
 
 	node = g_object_new (ANJUTA_TYPE_AM_PACKAGE_NODE, NULL);
 	node->base.type = ANJUTA_PROJECT_PACKAGE;
-	node->base.properties = amp_get_package_property_list();
+	node->base.native_properties = amp_get_package_property_list();
+	node->base.custom_properties = NULL;
 	node->base.file = NULL;
 	node->base.name = g_strdup (name);
 	node->base.state =  ANJUTA_PROJECT_CAN_REMOVE;
@@ -308,7 +311,7 @@ anjuta_am_package_node_finalize (GObject *object)
 {
 	AnjutaAmPackageNode *node = ANJUTA_AM_PACKAGE_NODE (object);
 
-	amp_property_free (node->base.properties);
+	g_list_foreach (node->base.custom_properties, (GFunc)amp_property_free, NULL);
 	
 	G_OBJECT_CLASS (anjuta_am_package_node_parent_class)->finalize (object);
 }
@@ -475,7 +478,8 @@ amp_group_new (GFile *file, gboolean dist_only, GError **error)
 	
 	node = g_object_new (ANJUTA_TYPE_AM_GROUP_NODE, NULL);
 	node->base.type = ANJUTA_PROJECT_GROUP;
-	node->base.properties = amp_get_group_property_list();
+	node->base.native_properties = amp_get_group_property_list();
+	node->base.custom_properties = NULL;
 	node->base.file = g_object_ref (file);
 	node->base.name = NULL;
 	node->base.state = ANJUTA_PROJECT_CAN_ADD_GROUP |
@@ -536,7 +540,7 @@ anjuta_am_group_node_finalize (GObject *object)
 	AnjutaAmGroupNode *node = ANJUTA_AM_GROUP_NODE (object);
 	gint i;
 	
-	amp_property_free (node->base.properties);
+	g_list_foreach (node->base.custom_properties, (GFunc)amp_property_free, NULL);
 	if (node->tfile) anjuta_token_file_free (node->tfile);
 	if (node->makefile) g_object_unref (node->makefile);
 	for (i = 0; i < AM_GROUP_TOKEN_LAST; i++)
@@ -635,7 +639,8 @@ amp_target_new (const gchar *name, AnjutaProjectNodeType type, const gchar *inst
 	
 	node = g_object_new (ANJUTA_TYPE_AM_TARGET_NODE, NULL);
 	node->base.type = ANJUTA_PROJECT_TARGET | type;
-	node->base.properties = amp_get_target_property_list(type);
+	node->base.native_properties = amp_get_target_property_list(type);
+	node->base.custom_properties = NULL;
 	node->base.name = g_strdup (name);
 	node->base.file = NULL;
 	node->base.state = ANJUTA_PROJECT_CAN_ADD_MODULE |
@@ -676,7 +681,7 @@ anjuta_am_target_node_finalize (GObject *object)
 {
 	AnjutaAmTargetNode *node = ANJUTA_AM_TARGET_NODE (object);
 
-	amp_property_free (node->base.properties);
+	g_list_foreach (node->base.custom_properties, (GFunc)amp_property_free, NULL);
 	G_OBJECT_CLASS (anjuta_am_target_node_parent_class)->finalize (object);
 }
 
@@ -702,7 +707,8 @@ amp_source_new (GFile *file, GError **error)
 
 	node = g_object_new (ANJUTA_TYPE_AM_SOURCE_NODE, NULL);
 	node->base.type = ANJUTA_PROJECT_SOURCE;
-	node->base.properties = amp_get_source_property_list();
+	node->base.native_properties = amp_get_source_property_list();
+	node->base.custom_properties = NULL;
 	node->base.name = NULL;
 	node->base.file = g_object_ref (file);
 	node->base.state = ANJUTA_PROJECT_CAN_REMOVE;
@@ -738,7 +744,7 @@ anjuta_am_source_node_finalize (GObject *object)
 {
 	AnjutaAmSourceNode *node = ANJUTA_AM_SOURCE_NODE (object);
 
-	amp_property_free (node->base.properties);
+	g_list_foreach (node->base.custom_properties, (GFunc)amp_property_free, NULL);
 	G_OBJECT_CLASS (anjuta_am_source_node_parent_class)->finalize (object);
 }
 
diff --git a/plugins/am-project/am-project-private.h b/plugins/am-project/am-project-private.h
index 50791bd..dfdebe6 100644
--- a/plugins/am-project/am-project-private.h
+++ b/plugins/am-project/am-project-private.h
@@ -38,8 +38,8 @@ struct _AmpProperty {
 };
 #endif
 
-struct _AmpPropertyInfo {
-	AnjutaProjectPropertyInfo base;
+struct _AmpProperty {
+	AnjutaProjectProperty base;
 	gint token_type;
 	gint position;
 	AnjutaToken *token;
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index 7edb314..aabf2d1 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -452,7 +452,7 @@ amp_target_property_buffer_free (AmpTargetPropertyBuffer *buffer)
 {
 	g_list_foreach (buffer->sources, (GFunc)amp_source_free, NULL);
 	g_list_free (buffer->sources);
-	amp_property_free (buffer->properties);
+	g_list_foreach (buffer->properties, (GFunc)amp_property_free, NULL);
 	g_free (buffer);
 }
 
@@ -465,7 +465,7 @@ amp_target_property_buffer_add_source (AmpTargetPropertyBuffer *buffer, AnjutaAm
 void
 amp_target_property_buffer_add_property (AmpTargetPropertyBuffer *buffer, AnjutaProjectProperty *prop)
 {
-	buffer->properties = g_list_concat (prop, buffer->properties);
+	buffer->properties = g_list_prepend (buffer->properties, prop);
 }
 
 GList *
@@ -1228,7 +1228,7 @@ project_node_save (AmpProject *project, AnjutaProjectNode *g_node, GError **erro
 void
 amp_project_load_properties (AmpProject *project, AnjutaToken *macro, AnjutaToken *args)
 {
-	AnjutaProjectProperty *item;
+	GList *item;
 	
 	//fprintf (stderr, "property list:\n");
 	//anjuta_token_dump (args);
@@ -1236,28 +1236,26 @@ amp_project_load_properties (AmpProject *project, AnjutaToken *macro, AnjutaToke
 	project->ac_init = macro;
 	project->args = args;
 
-	for (item = anjuta_project_node_first_valid_property (project->root_node); item != NULL; item = anjuta_project_property_next (item))
+	for (item = anjuta_project_node_get_native_properties (project->root_node); item != NULL; item = g_list_next (item))
 	{
-		AmpPropertyInfo *info = (AmpPropertyInfo *)anjuta_project_property_get_info (item);
+		AmpProperty *prop = (AmpProperty *)item->data;
 
-		if (info->position >= 0)
+		if (prop->position >= 0)
 		{
-			AnjutaProjectProperty *prop;
-			AnjutaProjectPropertyInfo *new_info;
+			AnjutaProjectProperty *new_prop;
 			AnjutaToken *arg;
 
-			prop = anjuta_project_node_remove_property (project->root_node, item);
-			if (prop == NULL)
+			new_prop = anjuta_project_node_remove_property (project->root_node, prop);
+			if (new_prop != NULL)
 			{
-				amp_property_free (prop);
+				amp_property_free (new_prop);
 			}
-			prop = amp_property_new (NULL, info->token_type, info->position, NULL, macro);
-			anjuta_project_node_insert_property (project->root_node, item, prop);
+			new_prop = amp_property_new (NULL, prop->token_type, prop->position, NULL, macro);
+			anjuta_project_node_insert_property (project->root_node, prop, new_prop);
 
-			new_info = anjuta_project_property_get_info (prop);
-			arg = anjuta_token_nth_word (args, info->position);
-			if ((new_info->value != NULL) && (new_info->value != info->base.value)) g_free (new_info->value);
-			new_info->value = anjuta_token_evaluate (arg);
+			arg = anjuta_token_nth_word (args, prop->position);
+			if ((new_prop->value != NULL) && (new_prop->value != prop->base.value)) g_free (new_prop->value);
+			new_prop->value = anjuta_token_evaluate (arg);
 		}
 	}
 	//g_message ("prop list %p get prop %p", *list, anjuta_project_node_get_property (project->root_node));
@@ -2161,7 +2159,7 @@ amp_project_unload (AmpProject *project)
 	if (project->root_file) g_object_unref (project->root_file);
 	project->root_file = NULL;
 
-	amp_property_free (project->properties);
+	g_list_foreach (project->properties, (GFunc)amp_property_free, NULL);
 	project->properties = amp_get_project_property_list ();
 	
 	/* shortcut hash tables */
diff --git a/plugins/am-project/am-properties.c b/plugins/am-project/am-properties.c
index 191416e..272da29 100644
--- a/plugins/am-project/am-properties.c
+++ b/plugins/am-project/am-properties.c
@@ -41,7 +41,7 @@
 /* Constants
   *---------------------------------------------------------------------------*/
 
-static AmpPropertyInfo AmpProjectProperties[] = {
+static AmpProperty AmpProjectProperties[] = {
 	{{N_("Name:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AC_TOKEN_AC_INIT, 0, NULL},
 	{{N_("Version:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AC_TOKEN_AC_INIT, 1, NULL},
 	{{N_("Bug report URL:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AC_TOKEN_AC_INIT, 2, NULL},
@@ -52,7 +52,7 @@ static AmpPropertyInfo AmpProjectProperties[] = {
 static GList* AmpProjectPropertyList = NULL;
 
 
-static AmpPropertyInfo AmpGroupProperties[] = {
+static AmpProperty AmpGroupProperties[] = {
 	{{N_("Linker flags:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AM_TOKEN__LDFLAGS, 0, NULL},
 	{{N_("C preprocessor flags:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AM_TOKEN__CPPFLAGS, 0, NULL},
 	{{N_("C compiler flags:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AM_TOKEN__CFLAGS, 0, NULL},
@@ -68,7 +68,7 @@ static AmpPropertyInfo AmpGroupProperties[] = {
 static GList* AmpGroupPropertyList = NULL;
 
 
-static AmpPropertyInfo AmpTargetProperties[] = {
+static AmpProperty AmpTargetProperties[] = {
 	{{N_("Do not install:"), ANJUTA_PROJECT_PROPERTY_BOOLEAN, NULL, NULL}, AM_TOKEN__PROGRAMS, 3, NULL},
 	{{N_("Installation directory:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AM_TOKEN__PROGRAMS, 6, NULL},
 	{{N_("Linker flags:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AM_TOKEN_TARGET_LDFLAGS, 0, NULL},
@@ -89,7 +89,7 @@ static AmpPropertyInfo AmpTargetProperties[] = {
 
 static GList* AmpTargetPropertyList = NULL;
 
-static AmpPropertyInfo AmpManTargetProperties[] = {
+static AmpProperty AmpManTargetProperties[] = {
 	{{N_("Additional dependencies:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, 0, 0, NULL},
 	{{N_("Do not use prefix:"), ANJUTA_PROJECT_PROPERTY_BOOLEAN, NULL, NULL}, AM_TOKEN__PROGRAMS, 1, NULL},
 	{{N_("Manual section:"), ANJUTA_PROJECT_PROPERTY_STRING, NULL, NULL}, AM_TOKEN__PROGRAMS, 5, NULL},
@@ -104,13 +104,13 @@ static GList* AmpManTargetPropertyList = NULL;
  *---------------------------------------------------------------------------*/
 
 static GList *
-amp_create_property_list (GList **list, AmpPropertyInfo *info)
+amp_create_property_list (GList **list, AmpProperty *properties)
 {
 	if (*list == NULL)
 	{
-		AmpPropertyInfo *prop;
+		AmpProperty *prop;
 
-		for (prop = info; prop->base.name != NULL; prop++)
+		for (prop = properties; prop->base.name != NULL; prop++)
 		{
 			*list = g_list_prepend (*list, prop);
 		}
@@ -130,37 +130,32 @@ amp_create_property_list (GList **list, AmpPropertyInfo *info)
 AnjutaProjectProperty *
 amp_property_new (const gchar *name, AnjutaTokenType type, gint position, const gchar *value, AnjutaToken *token)
 {
-	AmpPropertyInfo *info;
+	AmpProperty*prop;
 
-	info = g_slice_new0(AmpPropertyInfo);
-	info->base.name = g_strdup (name);
-	info->base.value = g_strdup (value);
-	info->token = token;
-	info->token_type = type;
-	info->position = position;
+	prop = g_slice_new0(AmpProperty);
+	prop->base.name = g_strdup (name);
+	prop->base.value = g_strdup (value);
+	prop->token = token;
+	prop->token_type = type;
+	prop->position = position;
 
-	return g_list_prepend (NULL, info);
+	return (AnjutaProjectProperty *)prop;
 }
 
 void
 amp_property_free (AnjutaProjectProperty *prop)
 {
-	for (; prop != NULL; prop = g_list_delete_link (prop, prop))
-	{
-		AmpPropertyInfo *info = (AmpPropertyInfo *)prop->data;
-
-		if (info->base.override == NULL) break;
+	if (prop->native == NULL) return;
 		
-		if ((info->base.name != NULL) && (info->base.name != ((AmpPropertyInfo *)(info->base.override->data))->base.name))
-		{
-			g_free (info->base.name);
-		}
-		if ((info->base.value != NULL) && (info->base.value != ((AmpPropertyInfo *)(info->base.override->data))->base.value))
-		{
-			g_free (info->base.value);
-		}
-		g_slice_free (AmpPropertyInfo, (AmpPropertyInfo *)info);
+	if ((prop->name != NULL) && (prop->name != prop->native->name))
+	{
+		g_free (prop->name);
 	}
+	if ((prop->value != NULL) && (prop->value != prop->native->value))
+	{
+		g_free (prop->value);
+	}
+	g_slice_free (AmpProperty, (AmpProperty *)prop);
 }
 
 /* Set property list
@@ -169,28 +164,26 @@ amp_property_free (AnjutaProjectProperty *prop)
 gboolean
 amp_node_property_load (AnjutaProjectNode *node, gint token_type, gint position, const gchar *value, AnjutaToken *token)
 {
-	AnjutaProjectProperty *item;
+	GList *item;
 	gboolean set = FALSE;
 	
-	for (item = anjuta_project_node_first_valid_property (node); item != NULL; item = anjuta_project_property_next (item))
+	for (item = anjuta_project_node_get_native_properties (node); item != NULL; item = g_list_next (item))
 	{
-		AmpPropertyInfo *info = (AmpPropertyInfo *)anjuta_project_property_get_info (item);
+		AmpProperty *prop = (AmpProperty *)item->data;
 
-		if ((info->token_type == token_type) && (info->position == position))
+		if ((prop->token_type == token_type) && (prop->position == position))
 		{
-			AnjutaProjectProperty *prop;
-			AnjutaProjectPropertyInfo *new_info;
+			AnjutaProjectProperty *new_prop;
 
-			prop = anjuta_project_node_get_property (node, item);
-			if (prop == NULL)
+			new_prop = anjuta_project_node_get_property (node, (AnjutaProjectProperty *)prop);
+			if (new_prop == NULL)
 			{
-				prop = amp_property_new (NULL, token_type, position, NULL, token);
-				anjuta_project_node_insert_property (node, item, prop);
+				new_prop = amp_property_new (NULL, token_type, position, NULL, token);
+				node->custom_properties = g_list_prepend (node->custom_properties, new_prop);
 			}
-			new_info = anjuta_project_property_get_info (prop);
 	
-			if ((new_info->value != NULL) && (new_info->value != info->base.value)) g_free (new_info->value);
-			new_info->value = g_strdup (value);
+			if ((new_prop->value != NULL) && (new_prop->value != prop->base.value)) g_free (new_prop->value);
+			new_prop->value = g_strdup (value);
 			set = TRUE;
 		}
 	}
@@ -199,36 +192,35 @@ amp_node_property_load (AnjutaProjectNode *node, gint token_type, gint position,
 }
 
 gboolean
-amp_node_property_add (AnjutaProjectNode *node, AnjutaProjectProperty *prop)
+amp_node_property_add (AnjutaProjectNode *node, AnjutaProjectProperty *new_prop)
 {
-	AnjutaProjectProperty *item;
+	GList *item;
 	gboolean set = FALSE;
 
-	for (item = anjuta_project_node_first_valid_property (node); item != NULL; item = anjuta_project_property_next (item))
+	for (item = anjuta_project_node_get_native_properties (node); item != NULL; item = g_list_next (item))
 	{
-		AmpPropertyInfo *info = (AmpPropertyInfo *)anjuta_project_property_get_info (item);
-		AmpPropertyInfo *new_info = (AmpPropertyInfo *)anjuta_project_property_get_info (prop);
+		AmpProperty *prop = (AmpProperty *)item->data;
 
-		if ((info->token_type == new_info->token_type) && (info->position == new_info->position))
+		if ((prop->token_type == ((AmpProperty *)new_prop)->token_type) && (prop->position == ((AmpProperty *)new_prop)->position))
 		{
-			if (info->base.type != ANJUTA_PROJECT_PROPERTY_LIST)
+			if (prop->base.type != ANJUTA_PROJECT_PROPERTY_LIST)
 			{
 				/* Replace property */
 				AnjutaProjectProperty *old_prop;
 
-				old_prop = anjuta_project_node_remove_property (node, item);
+				old_prop = anjuta_project_node_remove_property (node, (AnjutaProjectProperty *)prop);
 				if (old_prop != NULL)
 				{
 					amp_property_free (old_prop);
 				}
 			}
-			anjuta_project_node_insert_property (node, item, prop);
+			anjuta_project_node_insert_property (node, (AnjutaProjectProperty *)prop, new_prop);
 			set = TRUE;
 			break;
 		}
 	}
 
-	if (!set) amp_property_free (prop);
+	if (!set) amp_property_free (new_prop);
 	
 	return set;
 }
@@ -236,23 +228,17 @@ amp_node_property_add (AnjutaProjectNode *node, AnjutaProjectProperty *prop)
 AnjutaProjectProperty *
 amp_node_property_set (AnjutaProjectNode *node, AnjutaProjectProperty *prop, const gchar* value)
 {
-	AnjutaProjectProperty *item;
-	AmpPropertyInfo *info;
 	AnjutaProjectProperty *new_prop;
 		
-	info = (AmpPropertyInfo *)anjuta_project_property_get_info (prop);
 	new_prop = anjuta_project_node_get_property (node, prop);
-	if (new_prop != NULL)
+	if ((new_prop != NULL) && (new_prop->native != NULL))
 	{
-		AmpPropertyInfo *new_info;
-		new_info = (AmpPropertyInfo *)anjuta_project_property_get_info (new_prop);
-		
-		if ((new_info->base.value != NULL) && (new_info->base.value != ((AnjutaProjectPropertyInfo *)(new_info->base.override->data))->value)) g_free (new_info->base.value);
-		new_info->base.value = g_strdup (value);
+		if ((new_prop->value != NULL) && (new_prop->value != new_prop->native->value)) g_free (new_prop->value);
+		new_prop->value = g_strdup (value);
 	}
 	else
 	{
-		new_prop = amp_property_new (NULL, info->token_type, info->position, value, NULL);
+		new_prop = amp_property_new (NULL, ((AmpProperty *)prop)->token_type, ((AmpProperty *)prop)->position, value, NULL);
 		anjuta_project_node_insert_property (node, prop, new_prop);
 	}
 
diff --git a/plugins/am-project/projectparser.c b/plugins/am-project/projectparser.c
index 1259da7..7d8c463 100644
--- a/plugins/am-project/projectparser.c
+++ b/plugins/am-project/projectparser.c
@@ -136,36 +136,36 @@ list_module (IAnjutaProject *project, AnjutaProjectNode *root, AnjutaProjectNode
 static void
 list_property (IAnjutaProject *project, AnjutaProjectNode *parent, gint indent)
 {
-	AnjutaProjectProperty *prop;
+	GList *item;
 
-	for (prop = anjuta_project_node_first_property (parent); prop != NULL; prop = anjuta_project_property_next (prop))
+	for (item = anjuta_project_node_get_custom_properties (parent); item != NULL; item = g_list_next (item))
 	{
-		AnjutaProjectPropertyInfo *info;
+		AnjutaProjectProperty *prop;
 		const gchar *msg = NULL;
 
-		info = anjuta_project_property_get_info(prop);
-		if (strcmp (info->name, "Name:") == 0)
+		prop = (AnjutaProjectProperty *)item->data;
+		if (strcmp (prop->name, "Name:") == 0)
 		{
 			msg = "%*sNAME: %s";
 		}
-		else if (strcmp (info->name, "Version:") == 0)
+		else if (strcmp (prop->name, "Version:") == 0)
 		{
 			msg = "%*sVERSION: %s";
 		}
-		else if (strcmp (info->name, "Bug report URL:") == 0)
+		else if (strcmp (prop->name, "Bug report URL:") == 0)
 		{
 			msg = "%*sBUG_REPORT: %s";
 		}
-		else if (strcmp (info->name, "Package name:") == 0)
+		else if (strcmp (prop->name, "Package name:") == 0)
 		{
 			msg = "%*sTARNAME: %s";
 		}
-		else if (strcmp (info->name, "URL:") == 0)
+		else if (strcmp (prop->name, "URL:") == 0)
 		{
 			msg = "%*sURL: %s";
 		}
 
-		if (msg && (info->value != NULL)) print (msg, (indent + 1) * INDENT, "", info->value);
+		if (msg && (prop->value != NULL)) print (msg, (indent + 1) * INDENT, "", prop->value);
 	}
 }
 
@@ -318,14 +318,13 @@ get_target_type (IAnjutaProject *project, const char *id)
 static AnjutaProjectProperty *
 get_project_property (AmpProject *project, AnjutaProjectNode *parent, const gchar *id)
 {
-	AnjutaProjectProperty *item;
+	GList *item;
 	AnjutaProjectProperty *prop = NULL;
 	gint best = G_MAXINT;
 
-	for (item = anjuta_project_node_first_valid_property (parent); item != NULL; item = anjuta_project_property_next (item))
+	for (item = anjuta_project_node_get_native_properties (parent); item != NULL; item = g_list_next (item))
 	{
-		AnjutaProjectPropertyInfo *info = anjuta_project_property_get_info (item);
-		const gchar *name = info->name;
+		const gchar *name = ((AnjutaProjectProperty *)item->data)->name;
 		const gchar *ptr;
 		const gchar *iptr = id;
 		gboolean next = FALSE;
@@ -347,7 +346,7 @@ get_project_property (AmpProject *project, AnjutaProjectNode *parent, const gcha
 		if ((*iptr == '\0') && (miss < best))
 		{
 			best = miss;
-			prop = item;
+			prop =  ((AnjutaProjectProperty *)item->data);
 		}
 	}
 
diff --git a/plugins/dir-project/dir-node.c b/plugins/dir-project/dir-node.c
index e9e3716..0829299 100644
--- a/plugins/dir-project/dir-node.c
+++ b/plugins/dir-project/dir-node.c
@@ -45,7 +45,8 @@ dir_root_node_new (GFile *file)
 
 	root = g_object_new (ANJUTA_TYPE_DIR_ROOT_NODE, NULL);
 	root->base.type = ANJUTA_PROJECT_ROOT;
-	root->base.properties = NULL;
+	root->base.custom_properties = NULL;
+	root->base.native_properties = NULL;
 	root->base.file = g_file_dup (file);
 	root->base.name = NULL;
 
@@ -112,7 +113,8 @@ dir_group_node_new (GFile *file, GObject *emitter)
 
 	group = g_object_new (ANJUTA_TYPE_DIR_GROUP_NODE, NULL);
 	group->base.type = ANJUTA_PROJECT_GROUP;
-	group->base.properties = NULL;
+	group->base.native_properties = NULL;
+	group->base.custom_properties = NULL;
 	group->base.file = g_object_ref (file);
 	group->base.name = NULL;
 	group->base.state = ANJUTA_PROJECT_CAN_ADD_GROUP |
@@ -189,7 +191,8 @@ dir_source_node_new (GFile *file)
 
 	source = g_object_new (ANJUTA_TYPE_DIR_SOURCE_NODE, NULL);
 	source->base.type = ANJUTA_PROJECT_SOURCE;
-	source->base.properties = NULL;
+	source->base.native_properties = NULL;
+	source->base.custom_properties = NULL;
 	source->base.name = NULL;
 	source->base.file = g_file_dup (file);
 	source->base.state = ANJUTA_PROJECT_CAN_REMOVE |
diff --git a/plugins/project-manager/dialogs.c b/plugins/project-manager/dialogs.c
index b821851..6697fe5 100644
--- a/plugins/project-manager/dialogs.c
+++ b/plugins/project-manager/dialogs.c
@@ -394,42 +394,45 @@ add_entry (IAnjutaProject *project, AnjutaProjectNode *node, AnjutaProjectProper
 	GtkTreeViewColumn *column;
 	GtkTreeModel *model;
 	GtkTreeIter iter;
-	AnjutaProjectPropertyInfo *info = anjuta_project_property_get_info (prop);
+	GList *item;
 
-	if (info->override)
+	if (prop->native != NULL)
 	{
-		label = gtk_label_new (_(((AnjutaProjectPropertyInfo *)info->override->data)->name));
+		label = gtk_label_new (_(prop->native->name));
 	}
 	else
 	{
-		label = gtk_label_new (_(info->name));
+		label = gtk_label_new (_(prop->name));
 	}
 	gtk_misc_set_alignment (GTK_MISC (label), 0, -1);
 	gtk_widget_show (label);
 	gtk_table_attach (GTK_TABLE (table), label, 0, 1, *position, *position+1,
 			  GTK_FILL, GTK_FILL, 5, 3);
 
-	switch (info->type)
+	switch (prop->type)
 	{
 	case ANJUTA_PROJECT_PROPERTY_STRING:
 		entry = gtk_entry_new ();
-		gtk_entry_set_text (GTK_ENTRY (entry), info->value != NULL ? info->value : "");
+		gtk_entry_set_text (GTK_ENTRY (entry), prop->value != NULL ? prop->value : "");
 		break;
 	case ANJUTA_PROJECT_PROPERTY_BOOLEAN:
 		entry = gtk_check_button_new ();
-		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (entry), (info->value != NULL) && (*info->value == '1'));
+		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (entry), (prop->value != NULL) && (*prop->value == '1'));
 		break;
 	case ANJUTA_PROJECT_PROPERTY_LIST:
 			model = GTK_TREE_MODEL (gtk_list_store_newv (LIST_COLUMNS_NB, column_type));
 
-			while ((info->override != NULL) && (prop != NULL))
+			if (prop->native != NULL) prop = prop->native;
+			
+			for (item = anjuta_project_node_get_custom_properties (node); item != NULL; item = g_list_next (item))
 			{
-				info = anjuta_project_property_get_info (prop);
-
-				gtk_list_store_append (GTK_LIST_STORE (model), &iter);
-				gtk_list_store_set (GTK_LIST_STORE (model), &iter, NAME_COLUMN, info->name, VALUE_COLUMN, info->value, -1);
-
-				prop = anjuta_project_property_next_item (prop);
+				AnjutaProjectProperty *cust_prop = (AnjutaProjectProperty *)item->data;
+				
+				if (cust_prop->native == prop)
+				{
+					gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+					gtk_list_store_set (GTK_LIST_STORE (model), &iter, NAME_COLUMN, cust_prop->name, VALUE_COLUMN, cust_prop->value, -1);
+				}
 			}
 			
 			gtk_list_store_append (GTK_LIST_STORE (model), &iter);
@@ -512,8 +515,6 @@ create_properties_table (IAnjutaProject *project, AnjutaProjectNode *node)
 	AnjutaProjectNodeType type;
 	AnjutaProjectNodeInfo* node_info;
 	gboolean single;
-	AnjutaProjectProperty *valid_prop;
-
 
 	bxml = anjuta_util_builder_new (GLADE_FILE, NULL);
 	if (!bxml) return NULL;
@@ -562,9 +563,11 @@ create_properties_table (IAnjutaProject *project, AnjutaProjectNode *node)
 
 	/* Display other node properties */
 	single = FALSE;
-	for (valid_prop = anjuta_project_node_first_valid_property (node); valid_prop != NULL; valid_prop = anjuta_project_property_next (valid_prop))
+
+	for (item = anjuta_project_node_get_native_properties (node); item != NULL; item = g_list_next (item))
 	{
-		AnjutaProjectProperty *prop;
+		AnjutaProjectProperty *valid_prop = (AnjutaProjectProperty *)item->data; 
+		AnjutaProjectProperty *prop; 
 		GtkWidget *entry;
 
 		prop = anjuta_project_node_get_property (node, valid_prop);
@@ -587,7 +590,6 @@ create_properties_table (IAnjutaProject *project, AnjutaProjectNode *node)
 		}
 	}
 	table->properties = g_list_reverse (table->properties);
-
 	gtk_widget_show_all (properties);
 	
 	/* Hide expander if it is empty */
@@ -613,21 +615,19 @@ on_properties_dialog_response (GtkWidget *dialog,
 		{
 			PropertyEntry *entry = (PropertyEntry *)item->data;
 			AnjutaProjectProperty *prop;
-			AnjutaProjectPropertyInfo *info;
 			const gchar *text;
 			
 			/* Get property value in node */
 			prop = anjuta_project_node_get_property (table->node, entry->property);
 			if (prop == NULL) prop = entry->property;
 			
-			info = anjuta_project_property_get_info (prop);
-			switch (info->type)
+			switch (prop->type)
 			{
 			case ANJUTA_PROJECT_PROPERTY_STRING:
 				text = gtk_entry_get_text (GTK_ENTRY (entry->entry));
 				if (*text == '\0')
 				{
-					if ((info->value != NULL) && (*info->value != '\0'))
+					if ((prop->value != NULL) && (*prop->value != '\0'))
 					{
 						/* Remove */
 						PropertyValue *value;
@@ -639,7 +639,7 @@ on_properties_dialog_response (GtkWidget *dialog,
 				}
 				else
 				{
-					if (g_strcmp0 (info->value, text) != 0)
+					if (g_strcmp0 (prop->value, text) != 0)
 					{
 						/* Modified */
 						PropertyValue *value;
@@ -653,7 +653,7 @@ on_properties_dialog_response (GtkWidget *dialog,
 				break;
 			case ANJUTA_PROJECT_PROPERTY_BOOLEAN:
 				text = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (entry->entry)) ? "1" : "0";
-				if (g_strcmp0 (info->value, text) != 0)
+				if (g_strcmp0 (prop->value, text) != 0)
 				{
 					/* Modified */
 					PropertyValue *value;
diff --git a/plugins/project-manager/plugin.c b/plugins/project-manager/plugin.c
index c8e3897..d71f615 100644
--- a/plugins/project-manager/plugin.c
+++ b/plugins/project-manager/plugin.c
@@ -1216,7 +1216,7 @@ value_added_current_editor (AnjutaPlugin *plugin, const char *name,
 		return;
 	
 	pm_plugin = ANJUTA_PLUGIN_PROJECT_MANAGER (plugin);
-	
+
 	if (pm_plugin->current_editor_uri)
 		g_free (pm_plugin->current_editor_uri);
 	file = ianjuta_file_get_file (IANJUTA_FILE (editor), NULL);



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