forked from enlightenment/enlightenment
parent
2770ac3bcb
commit
1d3d622e21
|
@ -1327,34 +1327,45 @@ _cb_item_changed(void *data, int type, void *event)
|
|||
Item *it;
|
||||
Smart_Data *sd = evas_object_smart_data_get(v->span);
|
||||
|
||||
if (!sd) return 0;
|
||||
if (!sd)
|
||||
return 1;
|
||||
|
||||
EINA_LIST_FOREACH(sd->items, l, it)
|
||||
if (it->item == ev->item)
|
||||
{
|
||||
if (ev->changed_selection)
|
||||
{
|
||||
if (it->item->selected)
|
||||
_pan_item_select(v->span, it, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
if (!it->visible) break;
|
||||
if (!it)
|
||||
return 1;
|
||||
|
||||
edje_object_part_text_set(it->frame, "e.text.label", it->item->label);
|
||||
if (ev->changed_selection)
|
||||
{
|
||||
if (it->item->selected)
|
||||
_pan_item_select(v->span, it, 1);
|
||||
}
|
||||
|
||||
if (ev->changed_icon)
|
||||
{
|
||||
_item_hide(it);
|
||||
if (!it->visible)
|
||||
return 1;
|
||||
|
||||
if (!eina_list_data_find(sd->queue, it))
|
||||
sd->queue = eina_list_append(sd->queue, it);
|
||||
edje_object_part_text_set(it->frame, "e.text.label", it->item->label);
|
||||
|
||||
if (!sd->thumb_idler)
|
||||
sd->thumb_idler = ecore_timer_add(0.01,_thumb_idler, sd);
|
||||
}
|
||||
if (ev->changed_icon)
|
||||
{
|
||||
if (it->do_thumb) e_thumb_icon_end(it->thumb);
|
||||
if (it->thumb) evas_object_del(it->thumb);
|
||||
if (it->image) evas_object_del(it->image);
|
||||
|
||||
break;
|
||||
}
|
||||
it->thumb = NULL;
|
||||
it->image = NULL;
|
||||
|
||||
it->have_thumb = EINA_FALSE;
|
||||
it->do_thumb = EINA_FALSE;
|
||||
|
||||
if (!eina_list_data_find(sd->queue, it))
|
||||
sd->queue = eina_list_append(sd->queue, it);
|
||||
|
||||
if (!sd->thumb_idler)
|
||||
sd->thumb_idler = ecore_timer_add(0.01,_thumb_idler, sd);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue