[anjuta] project-manager: Allow to hide project node properties



commit 00384ff831a30c429e9d1bb18548368509730505
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Sat Nov 5 21:48:32 2011 +0100

    project-manager: Allow to hide project node properties

 libanjuta/anjuta-project.h         |    1 +
 plugins/am-project/am-properties.c |    2 +-
 plugins/project-manager/dialogs.c  |   38 +++++++++++++++++++----------------
 3 files changed, 23 insertions(+), 18 deletions(-)
---
diff --git a/libanjuta/anjuta-project.h b/libanjuta/anjuta-project.h
index 2510800..70cb597 100644
--- a/libanjuta/anjuta-project.h
+++ b/libanjuta/anjuta-project.h
@@ -42,6 +42,7 @@ typedef enum
 {
 	ANJUTA_PROJECT_PROPERTY_READ_ONLY = 1 << 0,
 	ANJUTA_PROJECT_PROPERTY_READ_WRITE = 1 << 1,
+	ANJUTA_PROJECT_PROPERTY_HIDDEN = 1 << 2,
 } AnjutaProjectPropertyFlags;
 
 struct _AnjutaProjectProperty
diff --git a/plugins/am-project/am-properties.c b/plugins/am-project/am-properties.c
index 9036f51..2327b3f 100644
--- a/plugins/am-project/am-properties.c
+++ b/plugins/am-project/am-properties.c
@@ -94,7 +94,7 @@ static AmpProperty AmpProjectProperties[] =
 		{"LT_INIT",
 		N_("Libtool support:"),
 			ANJUTA_PROJECT_PROPERTY_LIST,
-			ANJUTA_PROJECT_PROPERTY_READ_WRITE,
+			ANJUTA_PROJECT_PROPERTY_READ_WRITE | ANJUTA_PROJECT_PROPERTY_HIDDEN,
 			N_("Add support to compile shared and static libraries with libtool.")},
 		AC_TOKEN_LT_INIT, -1, "LT_INIT(",
 		AM_PROPERTY_IN_CONFIGURE
diff --git a/plugins/project-manager/dialogs.c b/plugins/project-manager/dialogs.c
index 143088a..5dfd2b5 100644
--- a/plugins/project-manager/dialogs.c
+++ b/plugins/project-manager/dialogs.c
@@ -683,26 +683,30 @@ update_properties (PropertiesTable *table)
 	for (item = anjuta_project_node_get_native_properties (table->node); item != NULL; item = g_list_next (item))
 	{
 		AnjutaProjectProperty *valid_prop = (AnjutaProjectProperty *)item->data;
-		AnjutaProjectProperty *prop;
-		GtkWidget *entry;
 
-		prop = anjuta_project_node_get_property (table->node, valid_prop);
-		if (prop->native != NULL)
+		if (!(valid_prop->flags & ANJUTA_PROJECT_PROPERTY_HIDDEN))
 		{
-			/* This property has been set, display it in the main part */
-			entry = add_entry (table->project->project, table->node, prop, table->main, &main_pos);
-		}
-		else
-		{
-			/* This property has not been set, hide it by default */
-			entry = add_entry (table->project->project, table->node, valid_prop, table->extra, &extra_pos);
-			single = TRUE;
-		}
+			AnjutaProjectProperty *prop;
+			GtkWidget *entry;
 
-		if (entry != NULL)
-		{
-			table->properties = g_list_prepend (table->properties,
-					pm_property_entry_new (entry, valid_prop));
+			prop = anjuta_project_node_get_property (table->node, valid_prop);
+			if (prop->native != NULL)
+			{
+				/* This property has been set, display it in the main part */
+				entry = add_entry (table->project->project, table->node, prop, table->main, &main_pos);
+			}
+			else
+			{
+				/* This property has not been set, hide it by default */
+				entry = add_entry (table->project->project, table->node, valid_prop, table->extra, &extra_pos);
+				single = TRUE;
+			}
+
+			if (entry != NULL)
+			{
+				table->properties = g_list_prepend (table->properties,
+						pm_property_entry_new (entry, valid_prop));
+			}
 		}
 	}
 	table->properties = g_list_reverse (table->properties);



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