[anjuta] dir-project: Avoid duplicated files in project view when reloading project
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] dir-project: Avoid duplicated files in project view when reloading project
- Date: Fri, 16 Mar 2012 21:52:55 +0000 (UTC)
commit 73f59e4672a8f7a5d308721514f0acd5d0d31e19
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Fri Mar 16 22:44:29 2012 +0100
dir-project: Avoid duplicated files in project view when reloading project
plugins/dir-project/dir-project.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/dir-project/dir-project.c b/plugins/dir-project/dir-project.c
index 557b5fb..e9f3196 100644
--- a/plugins/dir-project/dir-project.c
+++ b/plugins/dir-project/dir-project.c
@@ -629,12 +629,15 @@ dir_project_load_directory_callback (GObject *source_object,
node != NULL;
node = anjuta_project_node_next_sibling (node))
{
- if (g_file_equal (file, node->file))
+ source = (anjuta_project_node_get_node_type (node) == ANJUTA_PROJECT_OBJECT) ?
+ anjuta_project_node_first_child (node) :
+ node;
+ if (g_file_equal (file, anjuta_project_node_get_file (source)))
{
- source = node;
- anjuta_project_node_clear_state (source, ANJUTA_PROJECT_LOADING);
+ anjuta_project_node_clear_state (node, ANJUTA_PROJECT_LOADING);
break;
}
+ source = NULL;
}
if (source == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]