[anjuta/newproject] pm: Fix project manager to work with am backend
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/newproject] pm: Fix project manager to work with am backend
- Date: Tue, 25 May 2010 20:31:29 +0000 (UTC)
commit 6f892a5840bb7791c30e6d4ff9b5548da4334869
Author: Sébastien Granjoux <seb sfo free fr>
Date: Tue May 25 22:29:18 2010 +0200
pm: Fix project manager to work with am backend
plugins/am-project/am-project.c | 4 +---
plugins/project-manager/plugin.c | 1 +
plugins/project-manager/project.c | 7 +++++--
3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index e924a29..1349e85 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -2086,14 +2086,12 @@ amp_project_load_package (AmpProject *project, AnjutaProjectNode *node, GError *
gchar *err;
gchar *out;
gint status;
-
+
cmd = g_strdup_printf ("pkg-config --cflags %s", anjuta_project_node_get_name (node));
if (g_spawn_command_line_sync (cmd, &out, &err, &status, error))
{
gchar **flags;
-
- anjuta_project_node_clear_state (node, ANJUTA_PROJECT_INCOMPLETE);
flags = g_strsplit (out, " ", -1);
diff --git a/plugins/project-manager/plugin.c b/plugins/project-manager/plugin.c
index 12a136b..538a9ef 100644
--- a/plugins/project-manager/plugin.c
+++ b/plugins/project-manager/plugin.c
@@ -1376,6 +1376,7 @@ project_manager_load_gbf (ProjectManagerPlugin *pm_plugin)
DEBUG_PRINT ("loading project %s\n\n", dirname);
anjuta_pm_project_load (pm_plugin->project, dirfile, &error);
+ update_ui (pm_plugin);
g_free (basename);
g_free (dirname);
diff --git a/plugins/project-manager/project.c b/plugins/project-manager/project.c
index 25a3639..1b5dc3c 100644
--- a/plugins/project-manager/project.c
+++ b/plugins/project-manager/project.c
@@ -417,6 +417,7 @@ on_pm_project_load_incomplete (AnjutaProjectNode *node, AnjutaPmProject *project
if ((state & ANJUTA_PROJECT_INCOMPLETE) && !(state & ANJUTA_PROJECT_LOADING))
{
+ //g_message ("incomplete node %s", anjuta_project_node_get_name (node));
project->incomplete_node++;
anjuta_project_node_set_state (node, ANJUTA_PROJECT_LOADING);
//g_message ("load incomplete %p", node);
@@ -490,6 +491,8 @@ pm_command_load_complete (AnjutaPmProject *project, PmJob *job)
}
else
{
+ gboolean load = job->command == LOAD;
+
if (job->command == LOAD)
{
g_object_set (G_OBJECT (project->model), "project", project, NULL);
@@ -516,13 +519,14 @@ pm_command_load_complete (AnjutaPmProject *project, PmJob *job)
{
project->incomplete_node--;
//g_message ("remaining node %d", project->incomplete_node);
+ if (project->incomplete_node == 0) load = TRUE;
}
anjuta_project_node_clear_state (job->node, ANJUTA_PROJECT_LOADING | ANJUTA_PROJECT_INCOMPLETE);
anjuta_project_node_all_foreach (job->node, (AnjutaProjectNodeFunc)on_pm_project_load_incomplete, project);
if (project->incomplete_node == 0)
{
- g_signal_emit (G_OBJECT (project), signals[job->command == LOAD ? LOADED : UPDATED], 0, NULL);
+ g_signal_emit (G_OBJECT (project), signals[load ? LOADED : UPDATED], 0, NULL);
}
check_queue (project->job_queue, job->map);
}
@@ -689,7 +693,6 @@ pm_project_idle_func (AnjutaPmProject *project)
static void
on_node_updated (IAnjutaProject *sender, AnjutaProjectNode *node, AnjutaPmProject *project)
{
- g_message ("on node updated %p", node);
pm_project_push_command (project, RELOAD, node);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]