rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=32ec4a59e2e9bf90b1237adc158a83d0919a2fa6

commit 32ec4a59e2e9bf90b1237adc158a83d0919a2fa6
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Dec 15 11:59:23 2015 +0200

    group_manager: add gm_part_restack method
---
 src/bin/project_manager/group_manager.c | 19 +++++++++++++++++++
 src/bin/project_manager/group_manager.h |  2 ++
 2 files changed, 21 insertions(+)

diff --git a/src/bin/project_manager/group_manager.c 
b/src/bin/project_manager/group_manager.c
index 2f52db4..19189ae 100644
--- a/src/bin/project_manager/group_manager.c
+++ b/src/bin/project_manager/group_manager.c
@@ -632,3 +632,22 @@ gm_part_rename(Part_* part, const char *new_part_name)
    eina_stringshare_del(part->name);
    part->name = eina_stringshare_add(new_part_name);
 }
+
+void
+gm_part_restack(Part_ *part, Part_ *rel_part)
+{
+   Eina_List *rel_l;
+
+   assert(part != NULL);
+
+   part->group->parts = eina_list_remove(part->group->parts, part);
+
+   if (rel_part)
+     {
+        rel_l = eina_list_data_find_list(part->group->parts, rel_part);
+        assert (rel_l != NULL);
+        part->group->parts = 
eina_list_prepend_relative_list(part->group->parts, part, rel_l);
+     }
+   else
+     part->group->parts = eina_list_append(part->group->parts, part);
+}
diff --git a/src/bin/project_manager/group_manager.h 
b/src/bin/project_manager/group_manager.h
index f66ff1f..fedfdb7 100644
--- a/src/bin/project_manager/group_manager.h
+++ b/src/bin/project_manager/group_manager.h
@@ -127,4 +127,6 @@ gm_part_item_del(Project *pro, Part_ *part, 
Eina_Stringshare *item_name);
 void
 gm_part_rename(Part_* part, const char *new_part_name);
 
+void
+gm_part_restack(Part_ *part, Part_ *rel_part);
 #endif /* GROUP_MANAGER_H */

-- 


Reply via email to