EINA_LIST_FOREACH(itb->items, l, it)
{
- if (itb->must_recalc || (GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP))
+ if (itb->must_recalc || !(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
{
if (it->dragging)
{
/* homogeneous genlist shortcut */
if ((calc) && (sd->homogeneous) && (!it->item->mincalcd) &&
- (((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) && sd->group_item_width) ||
- ((GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP) && sd->item_width)))
+ (((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) && sd->group_item_width) ||
+ (!(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) && sd->item_width)))
{
- if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
{
it->item->w = it->item->minw = sd->group_item_width;
it->item->h = it->item->minh = sd->group_item_height;
it->item->mincalcd = EINA_TRUE;
if ((!sd->group_item_width) &&
- (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP))
+ (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
{
sd->group_item_width = mw;
sd->group_item_height = mh;
vis = (ELM_RECTS_INTERSECT
(it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h,
cvx, cvy, cvw, cvh));
- if (GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP)
+ if (!(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
{
if ((itb->realized) && (!it->realized))
{
if (it->tooltip.del_cb)
it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
- if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
sd->group_items = eina_list_remove(sd->group_items, it);
ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free);
sd->longpressed = EINA_TRUE;
evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, EO_OBJ(it));
- if ((sd->reorder_mode) && (GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP))
+ if ((sd->reorder_mode) && !(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
{
sd->reorder_it = it;
sd->reorder_start_y = 0;
if (!itb->realized)
{
if (qadd || (itb->sd->homogeneous &&
- (((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) &&
+ (((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
(!itb->sd->group_item_height)) ||
- ((GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP) &&
+ (!(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
(!itb->sd->item_height)))))
{
if (!it->item->mincalcd) changed = EINA_TRUE;
if (itb->sd->homogeneous)
{
- if ((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) &&
+ if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
(itb->sd->group_item_height == 0))
doit = EINA_TRUE;
else if (itb->sd->item_height == 0)
}
else
{
- if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
{
it->item->w = it->item->minw =
sd->group_item_width;
if ((itb->sd->homogeneous) &&
(itb->sd->mode == ELM_LIST_COMPRESS))
{
- if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
{
it->item->w = it->item->minw =
sd->group_item_width;
if (it->parent)
{
- if (GL_IT(it->parent)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it->parent)->type & ELM_GENLIST_ITEM_GROUP)
GL_IT(it)->group_item = parent;
else if (GL_IT(it->parent)->group_item)
GL_IT(it)->group_item = GL_IT(it->parent)->group_item;
}
for (it2 = it, depth = 0; it2->parent; it2 = it2->parent)
{
- if (!GL_IT(it2->parent)->type == ELM_GENLIST_ITEM_GROUP) depth += 1;
+ if (!(GL_IT(it2->parent)->type & ELM_GENLIST_ITEM_GROUP)) depth += 1;
}
GL_IT(it)->expanded_depth = depth;
sd->item_count++;
if (!it->parent)
{
- if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
sd->group_items = eina_list_append(sd->group_items, it);
sd->items = eina_inlist_append(sd->items, EINA_INLIST_GET(it));
it->item->rel = NULL;
if (!it->parent)
{
- if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
sd->group_items = eina_list_prepend(sd->group_items, it);
sd->items = eina_inlist_prepend(sd->items, EINA_INLIST_GET(it));
it->item->rel = NULL;
if (!it->parent)
{
- if ((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) &&
- (GL_IT(after)->type == ELM_GENLIST_ITEM_GROUP))
+ if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
+ (GL_IT(after)->type & ELM_GENLIST_ITEM_GROUP))
sd->group_items = eina_list_append_relative
(sd->group_items, it, after);
}
if (!it->parent)
{
- if ((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) &&
- (GL_IT(before)->type == ELM_GENLIST_ITEM_GROUP))
+ if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
+ (GL_IT(before)->type & ELM_GENLIST_ITEM_GROUP))
sd->group_items =
eina_list_prepend_relative(sd->group_items, it, before);
}
// reset homogeneous item size
if (sd->homogeneous)
{
- if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)
+ if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
sd->group_item_width = sd->group_item_height = 0;
else
sd->item_width = sd->item_height = 0;