Commit ebe54f38 authored by Sebastien Granjoux's avatar Sebastien Granjoux

pm: Fix a bug when displaying new target dialog

parent 8208b426
......@@ -3257,7 +3257,7 @@ interface IAnjutaProject
* Return value: (element-type Anjuta.ProjectNodeInfo) (transfer none): TRUE if the property has been successfully removed
* else FALSE
*/
List<AnjutaProjectNodeInformation *> get_node_info();
const List<AnjutaProjectNodeInformation *> get_node_info();
}
/**
......
......@@ -1918,7 +1918,7 @@ amp_project_remove_source (AmpProject *project,
amp_source_free (source);
}
GList *
const GList *
amp_project_get_node_info (AmpProject *project, GError **error)
{
static GList *info_list = NULL;
......@@ -2650,7 +2650,7 @@ iproject_get_root (IAnjutaProject *obj, GError **err)
return AMP_PROJECT (obj)->root;
}
static GList*
static const GList*
iproject_get_node_info (IAnjutaProject *obj, GError **err)
{
return amp_project_get_node_info (AMP_PROJECT (obj), err);
......
......@@ -117,7 +117,7 @@ AnjutaAmSourceNode* amp_project_add_sibling_source (AmpProject *project, Anjuta
void amp_project_remove_source (AmpProject *project, AnjutaAmSourceNode *source, GError **error);
AnjutaProjectNodeInfo *amp_project_get_type_info (AmpProject *project, AnjutaProjectNodeType type);
GList *amp_project_get_node_info (AmpProject *project, GError **error);
const GList *amp_project_get_node_info (AmpProject *project, GError **error);
GList *amp_project_get_config_modules (AmpProject *project, GError **error);
GList *amp_project_get_config_packages (AmpProject *project, const gchar* module, GError **error);
......
......@@ -338,8 +338,8 @@ static AnjutaProjectNodeType
get_target_type (IAnjutaProject *project, const char *id)
{
AnjutaProjectNodeType type;
GList *list;
GList *item;
const GList *list;
const GList *item;
guint num = atoi (id);
list = ianjuta_project_get_node_info (project, NULL);
......@@ -358,7 +358,6 @@ get_target_type (IAnjutaProject *project, const char *id)
num--;
}
}
g_list_free (list);
return type;
}
......
......@@ -512,7 +512,7 @@ create_properties_table (IAnjutaProject *project, AnjutaProjectNode *node)
gint main_pos;
gint extra_pos;
gchar *path;
GList *item;
const GList *item;
AnjutaProjectNodeType type;
AnjutaProjectNodeInfo* node_info;
gboolean single;
......@@ -1080,8 +1080,8 @@ build_types_store (AnjutaPmProject *project)
{
GtkListStore *store;
GtkTreeIter iter;
GList *types;
GList *node;
const GList *types;
const GList *node;
types = anjuta_pm_project_get_node_info (project);
store = gtk_list_store_new (TARGET_TYPE_N_COLUMNS,
......@@ -1089,7 +1089,7 @@ build_types_store (AnjutaPmProject *project)
G_TYPE_STRING,
GDK_TYPE_PIXBUF);
for (node = g_list_first (types); node != NULL; node = g_list_next (node)) {
for (node = types; node != NULL; node = g_list_next (node)) {
GdkPixbuf *pixbuf;
const gchar *name;
AnjutaProjectNodeType type;
......@@ -1116,8 +1116,6 @@ build_types_store (AnjutaPmProject *project)
}
}
g_list_free (types);
return store;
}
......
......@@ -262,7 +262,7 @@ anjuta_pm_project_get_capabilities (AnjutaPmProject *project)
if (project->project != NULL)
{
GList *item;
const GList *item;
for (item = anjuta_pm_project_get_node_info (project); item != NULL; item = g_list_next (item))
{
......@@ -294,7 +294,7 @@ anjuta_pm_project_get_capabilities (AnjutaPmProject *project)
return caps;
}
GList *
const GList *
anjuta_pm_project_get_node_info (AnjutaPmProject *project)
{
g_return_val_if_fail (project->project != NULL, NULL);
......
......@@ -80,7 +80,7 @@ gboolean anjuta_pm_project_unload (AnjutaPmProject *project, GError **error);
gboolean anjuta_pm_project_refresh (AnjutaPmProject *project, GError **error);
gint anjuta_pm_project_get_capabilities (AnjutaPmProject *project);
GList *anjuta_pm_project_get_node_info (AnjutaPmProject *project);
const GList *anjuta_pm_project_get_node_info (AnjutaPmProject *project);
GList *anjuta_pm_project_get_packages (AnjutaPmProject *project);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment