ajwillia-ms pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=bbc316b3e15e596bfdb4de8be46a7f9c1b46bf95
commit bbc316b3e15e596bfdb4de8be46a7f9c1b46bf95 Author: Andy Williams <[email protected]> Date: Wed Feb 19 10:30:10 2014 +0000 Fix T966, sort order of child folders. Comparison was being incorrectly applied for child elements - they need to be treated differently if there are no siblings --- src/lib/elm_genlist.c | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 4dbda67..1846cb2 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5758,26 +5758,37 @@ _item_sorted_insert(Eo *obj EINA_UNUSED, void *_pd, va_list *list) &cmp_result); if (l) - rel = eina_list_data_get(l); - else - rel = it->parent; + { + rel = eina_list_data_get(l); - if (cmp_result >= 0) + if (cmp_result >= 0) + { + it->parent->item->items = eina_list_prepend_relative_list + (it->parent->item->items, it, l); + sd->items = eina_inlist_prepend_relative + (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel)); + it->item->before = EINA_TRUE; + } + else if (cmp_result < 0) + { + it->parent->item->items = eina_list_append_relative_list + (it->parent->item->items, it, l); + sd->items = eina_inlist_append_relative + (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel)); + it->item->before = EINA_FALSE; + } + } + else { + rel = it->parent; + + // ignoring the comparison it->parent->item->items = eina_list_prepend_relative_list (it->parent->item->items, it, l); sd->items = eina_inlist_prepend_relative (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel)); it->item->before = EINA_FALSE; } - else if (cmp_result < 0) - { - it->parent->item->items = eina_list_append_relative_list - (it->parent->item->items, it, l); - sd->items = eina_inlist_append_relative - (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel)); - it->item->before = EINA_TRUE; - } } else { --
