}
static void
+_item_unhighlight(Elm_Genlist_Item *it)
+{
+ const char *stacking, *selectraise;
+ if ((it->delete_me) || (!it->highlighted)) return;
+ edje_object_signal_emit(it->base.view, "elm,state,unselected", "elm");
+ stacking = edje_object_data_get(it->base.view, "stacking");
+ selectraise = edje_object_data_get(it->base.view, "selectraise");
+ if (!it->nostacking)
+ {
+ if ((it->order_num_in & 0x1) ^ it->stacking_even) evas_object_lower(it->base.view);
+ else evas_object_raise(it->base.view);
+ }
+ it->highlighted = EINA_FALSE;
+}
+
+static void
_item_block_del(Elm_Genlist_Item *it)
{
Eina_Inlist *il;
static void
_item_unselect(Elm_Genlist_Item *it)
{
- const char *stacking, *selectraise;
-
- if ((it->delete_me) || (!it->highlighted)) return;
- edje_object_signal_emit(it->base.view, "elm,state,unselected", "elm");
- stacking = edje_object_data_get(it->base.view, "stacking");
- selectraise = edje_object_data_get(it->base.view, "selectraise");
- if (!it->nostacking)
- {
- if ((it->order_num_in & 0x1) ^ it->stacking_even) evas_object_lower(it->base.view);
- else evas_object_raise(it->base.view);
- }
- it->highlighted = EINA_FALSE;
- if (it->selected)
- {
- it->selected = EINA_FALSE;
- it->wd->selected = eina_list_remove(it->wd->selected, it);
- evas_object_smart_callback_call(it->base.widget, SIG_UNSELECTED, it);
- }
+ if ((it->delete_me) || (!it->selected)) return;
+ it->selected = EINA_FALSE;
+ it->wd->selected = eina_list_remove(it->wd->selected, it);
+ evas_object_smart_callback_call(it->base.widget, SIG_UNSELECTED, it);
}
static void
{
it->wd->on_hold = EINA_TRUE;
if (!it->wd->wasselected)
- _item_unselect(it);
+ {
+ _item_unhighlight(it);
+ _item_unselect(it);
+ }
}
}
if (it->wd->multitouched)
it->long_timer = NULL;
}
if (!it->wd->wasselected)
- _item_unselect(it);
+ {
+ _item_unhighlight(it);
+ _item_unselect(it);
+ }
if (dy < 0)
{
if (ady > adx)
it->wd->multitouched = EINA_TRUE;
it->wd->prev_mx = ev->canvas.x;
it->wd->prev_my = ev->canvas.y;
- if (!it->wd->wasselected) _item_unselect(it);
+ if (!it->wd->wasselected)
+ {
+ _item_unhighlight(it);
+ _item_unselect(it);
+ }
it->wd->wasselected = EINA_FALSE;
it->wd->longpressed = EINA_FALSE;
if (it->long_timer)
{
it->wd->longpressed = EINA_FALSE;
if (!it->wd->wasselected)
- _item_unselect(it);
+ {
+ _item_unhighlight(it);
+ _item_unselect(it);
+ }
it->wd->wasselected = EINA_FALSE;
return;
}
_item_highlight(it);
_item_select(it);
}
- else _item_unselect(it);
+ else
+ {
+ _item_unhighlight(it);
+ _item_unselect(it);
+ }
}
else
{
Widget_Data *wd = it->wd;
if (wd)
{
- while (wd->selected) _item_unselect(wd->selected->data);
+ while (wd->selected)
+ {
+ _item_unhighlight(wd->selected->data);
+ _item_unselect(wd->selected->data);
+ }
}
}
else
Elm_Genlist_Item *it2;
EINA_LIST_FOREACH_SAFE(it->wd->selected, l, l_next, it2)
- if (it2 != it) _item_unselect(it2);
+ if (it2 != it)
+ {
+ _item_unhighlight(it2);
+ _item_unselect(it2);
+ }
//_item_highlight(it);
//_item_select(it);
}
if (!wd->multi)
{
while (wd->selected)
- _item_unselect(wd->selected->data);
+ {
+ _item_unhighlight(wd->selected->data);
+ _item_unselect(wd->selected->data);
+ }
}
_item_highlight(it);
_item_select(it);
}
else
- _item_unselect(it);
+ {
+ _item_unhighlight(it);
+ _item_unselect(it);
+ }
}
/**