jaehwan pushed a commit to branch master. http://git.enlightenment.org/tools/eflete.git/commit/?id=42b79b625658d1f76f050213d615af8ce954b0d2
commit 42b79b625658d1f76f050213d615af8ce954b0d2 Author: Jaehwan Kim <[email protected]> Date: Wed Jun 1 20:18:46 2016 +0900 group_manager: add all groups if there's no checked widget @fix --- src/bin/project_manager/group_manager.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/bin/project_manager/group_manager.c b/src/bin/project_manager/group_manager.c index 9179147..6174543 100644 --- a/src/bin/project_manager/group_manager.c +++ b/src/bin/project_manager/group_manager.c @@ -421,6 +421,27 @@ gm_group_del(Project *pro, Group *group) free(group); } +Eina_Bool +_is_checked(Eina_List *widgets) +{ + Eina_List *l, *ll, *lll; + Tree_Item_Data *widget, *style; + End_Item_Data *item_style; + + EINA_LIST_FOREACH(widgets, l, widget) + { + if (widget->check) return EINA_TRUE; + EINA_LIST_FOREACH(widget->list, ll, style) + { + if (style->check) return EINA_TRUE; + EINA_LIST_FOREACH(style->list, lll, item_style) + if (item_style->check) return EINA_TRUE; + } + } + + return EINA_FALSE; +} + void gm_groups_load(Project *pro) { @@ -430,7 +451,7 @@ gm_groups_load(Project *pro) Tree_Item_Data *widget, *style; End_Item_Data *item_style; Group *group; - Eina_Bool check; + Eina_Bool check, is_checked; assert(pro != NULL); assert(pro->dev != NULL); @@ -440,13 +461,15 @@ gm_groups_load(Project *pro) assert(collections != NULL); + is_checked = _is_checked(pro->widgets); + collections = eina_list_sort(collections, eina_list_count(collections), (Eina_Compare_Cb) strcmp); EINA_LIST_FOREACH(collections, l, group_name) { check = false; if (!strcmp(group_name, EFLETE_INTERNAL_GROUP_NAME)) continue; - if (pro->widgets) + if (pro->widgets && is_checked) { widget_name = widget_name_get(group_name); if (!widget_name) continue; --
