Пример #1
0
void
mkp_project_unload (MkpProject *project)
{
	AnjutaProjectNode *node;

	monitors_remove (project);

	/* project data */
	if (project->root_file) g_object_unref (project->root_file);
	project->root_file = NULL;

	/* Remove all children */
	while ((node = anjuta_project_node_first_child (ANJUTA_PROJECT_NODE (project))) != NULL)
	{
		g_object_unref (node);
	}

	/* shortcut hash tables */
	if (project->groups) g_hash_table_destroy (project->groups);
	project->groups = NULL;
	if (project->files) g_hash_table_destroy (project->files);
	project->files = NULL;
	if (project->variables) g_hash_table_destroy (project->variables);
	project->variables = NULL;

	mkp_project_free_rules (project);

	/* List styles */
	if (project->space_list) anjuta_token_style_free (project->space_list);
	if (project->arg_list) anjuta_token_style_free (project->arg_list);
}
Пример #2
0
static void
monitors_setup (MkpProject *project)
{
	g_return_if_fail (project != NULL);

	monitors_remove (project);

	/* setup monitors hash */
	project->monitors = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
						   (GDestroyNotify) g_file_monitor_cancel);

	if (project->files)
		g_hash_table_foreach (project->files, files_hash_foreach_monitor, project);
}
Пример #3
0
void
dir_project_unload (DirProject *project)
{
	monitors_remove (project);
	
	/* project data */
	project_node_destroy (project, project->root_node);
	project->root_node = NULL;

	if (project->root_file) g_object_unref (project->root_file);
	project->root_file = NULL;

	/* shortcut hash tables */
	if (project->groups) g_hash_table_destroy (project->groups);
	project->groups = NULL;

	/* sources patterns */
	while (project->sources)
	{
		project->sources = dir_pop_pattern_list (project->sources);
	}
}