Beispiel #1
0
static gboolean
pm_command_load_complete (AnjutaPmProject *project, AnjutaProjectNode *node, GError *error)
{
	gboolean complete = FALSE;

	//g_message ("pm_command_load_complete %p", node);
	if (error == NULL)
	{
		if (project->root == node)
		{
			project->incomplete_node = 0;
		}
		
		// Check for incompletely loaded object and load them
		if (anjuta_project_node_get_state (node) & ANJUTA_PROJECT_INCOMPLETE)
		{
			project->incomplete_node--;
			//g_message ("remaining node %d", project->incomplete_node);
		}
		anjuta_project_node_clear_state (node, ANJUTA_PROJECT_LOADING | ANJUTA_PROJECT_INCOMPLETE);
		anjuta_project_node_foreach (node, G_POST_ORDER, (AnjutaProjectNodeForeachFunc)on_pm_project_load_incomplete, project);

		complete = !project->loaded && (project->incomplete_node == 0);
		if (complete) project->loaded = TRUE;
	}

	//g_message ("pm_command_load_complete %d is loaded %d", complete, ianjuta_project_is_loaded (project->project, NULL));
	g_signal_emit (G_OBJECT (project), signals[LOADED], 0, node, complete, error);

	
	return TRUE;
}
Beispiel #2
0
static void
quick_open_plugin_load_project_files(QuickOpenPlugin* self, IAnjutaProject* project)
{
    AnjutaProjectNode* root;
    GSList* project_files = NULL;

    root = ianjuta_project_get_root (project, NULL);

    anjuta_project_node_foreach(root, G_POST_ORDER, project_node_foreach_func, &project_files);
    quick_open_dialog_add_project_files(self->dialog, project_files);
    g_slist_free(project_files);
}