it->func.data = func_data;
it->mouse_cursor = NULL;
it->expanded_depth = 0;
+
+ if (it->parent)
+ {
+ if (it->parent->flags & ELM_GENLIST_ITEM_GROUP)
+ it->group_item = parent;
+ else if (it->parent->group_item)
+ it->group_item = it->parent->group_item;
+ }
return it;
}
EINA_INLIST_GET(it2));
it->rel = it2;
it->rel->relcount++;
-
- if (it->parent->flags & ELM_GENLIST_ITEM_GROUP)
- it->group_item = parent;
- else if (it->parent->group_item)
- it->group_item = it->parent->group_item;
}
it->before = EINA_FALSE;
_item_queue(wd, it);
Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
func_data);
if (!it) return NULL;
- if (it->parent)
+ if (!it->parent)
+ {
+ if ((flags & ELM_GENLIST_ITEM_GROUP) &&
+ (before->flags & ELM_GENLIST_ITEM_GROUP))
+ wd->group_items = eina_list_prepend_relative(wd->group_items, it,
+ before);
+ }
+ else
{
it->parent->items = eina_list_prepend_relative(it->parent->items, it,
before);
wd->items = eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));
it->before = EINA_TRUE;
}
-
- if (it->parent->flags & ELM_GENLIST_ITEM_GROUP)
- it->group_item = parent;
- else if (it->parent->group_item)
- it->group_item = it->parent->group_item;
}
else
{
wd->items = eina_inlist_append_relative(wd->items, EINA_INLIST_GET(it),
EINA_INLIST_GET(after));
- if (it->parent)
+ if (!it->parent)
+ {
+ if ((flags & ELM_GENLIST_ITEM_GROUP) &&
+ (after->flags & ELM_GENLIST_ITEM_GROUP))
+ wd->group_items = eina_list_append_relative(wd->group_items, it,
+ after);
+ }
+ else
{
it->parent->items = eina_list_append_relative(it->parent->items, it,
after);