summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2015-01-15 20:26:25 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-01-15 20:26:25 +0900
commit741698256474e589a7cf6cb19aed1292c9b12583 (patch)
treec4ba46721d41a7905f42bc4b1ec2507411f66273
parent94f0f1ba40d6066d4bf8b7594c2c636b49966b16 (diff)
Revert "Revert "genilst: get rid of lazy deletion.""
This reverts commit 94f0f1ba40d6066d4bf8b7594c2c636b49966b16.
-rw-r--r--src/lib/elm_genlist.c89
-rw-r--r--src/lib/elm_widget_genlist.h6
2 files changed, 16 insertions, 79 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 785316420..1168f3ec0 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -1287,9 +1287,7 @@ _decorate_all_item_realize(Elm_Gen_Item *it,
1287 if (!it) return; 1287 if (!it) return;
1288 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 1288 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
1289 1289
1290 if ((it->item->decorate_all_item_realized) || 1290 if (it->item->decorate_all_item_realized) return;
1291 (it->generation < sd->generation))
1292 return;
1293 1291
1294 it->deco_all_view = edje_object_add(evas_object_evas_get(WIDGET(it))); 1292 it->deco_all_view = edje_object_add(evas_object_evas_get(WIDGET(it)));
1295 edje_object_scale_set(it->deco_all_view, elm_widget_scale_get(WIDGET(it)) * 1293 edje_object_scale_set(it->deco_all_view, elm_widget_scale_get(WIDGET(it)) *
@@ -1624,7 +1622,6 @@ _item_realize(Elm_Gen_Item *it,
1624 int tsize = 20; 1622 int tsize = 20;
1625 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 1623 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
1626 1624
1627 if (it->generation < sd->generation) return;
1628 if (it->realized) 1625 if (it->realized)
1629 { 1626 {
1630 if (it->item->order_num_in != in) 1627 if (it->item->order_num_in != in)
@@ -2158,9 +2155,7 @@ _item_block_position(Item_Block *itb,
2158 EINA_LIST_FOREACH(itb->items, l, it) 2155 EINA_LIST_FOREACH(itb->items, l, it)
2159 { 2156 {
2160 sd = GL_IT(it)->wsd; 2157 sd = GL_IT(it)->wsd;
2161 if (it->generation < sd->generation) continue; 2158 if (sd->reorder_it == it) continue;
2162 else if (sd->reorder_it == it)
2163 continue;
2164 2159
2165 it->x = 0; 2160 it->x = 0;
2166 it->y = y; 2161 it->y = y;
@@ -2387,9 +2382,7 @@ _item_multi_select_up(Elm_Genlist_Data *sd)
2387 while (eo_prev) 2382 while (eo_prev)
2388 { 2383 {
2389 ELM_GENLIST_ITEM_DATA_GET(eo_prev, prev); 2384 ELM_GENLIST_ITEM_DATA_GET(eo_prev, prev);
2390 if ((prev->generation == sd->generation) && 2385 if ((!_is_no_select(prev)) && (!elm_object_item_disabled_get(eo_prev)))
2391 (!_is_no_select(prev)) &&
2392 (!elm_object_item_disabled_get(eo_prev)))
2393 break; 2386 break;
2394 eo_prev = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev)); 2387 eo_prev = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev));
2395 } 2388 }
@@ -2421,9 +2414,7 @@ _item_multi_select_down(Elm_Genlist_Data *sd)
2421 while ((eo_next)) 2414 while ((eo_next))
2422 { 2415 {
2423 ELM_GENLIST_ITEM_DATA_GET(eo_next, next); 2416 ELM_GENLIST_ITEM_DATA_GET(eo_next, next);
2424 if ((next->generation == sd->generation) && 2417 if ((_is_no_select(next)) && (!elm_object_item_disabled_get(eo_next)))
2425 (!_is_no_select(next)) &&
2426 (!elm_object_item_disabled_get(eo_next)))
2427 break; 2418 break;
2428 eo_next = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next)); 2419 eo_next = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next));
2429 } 2420 }
@@ -2477,8 +2468,7 @@ _item_single_select_up(Elm_Genlist_Data *sd)
2477 2468
2478 while (prev) 2469 while (prev)
2479 { 2470 {
2480 if ((prev->generation == sd->generation) && 2471 if ((!_is_no_select(prev)) &&
2481 (!_is_no_select(prev)) &&
2482 (!elm_object_item_disabled_get(EO_OBJ(prev)))) 2472 (!elm_object_item_disabled_get(EO_OBJ(prev))))
2483 break; 2473 break;
2484 prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev); 2474 prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev);
@@ -2509,8 +2499,7 @@ _item_single_select_down(Elm_Genlist_Data *sd)
2509 2499
2510 while ((next)) 2500 while ((next))
2511 { 2501 {
2512 if ((next->generation == sd->generation) && 2502 if ((!_is_no_select(next)) &&
2513 (!_is_no_select(next)) &&
2514 (!elm_object_item_disabled_get(EO_OBJ(next)))) 2503 (!elm_object_item_disabled_get(EO_OBJ(next))))
2515 break; 2504 break;
2516 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); 2505 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
@@ -2534,9 +2523,6 @@ _elm_genlist_item_focused(Elm_Object_Item *eo_it)
2534 ELM_GENLIST_DATA_GET(obj, sd); 2523 ELM_GENLIST_DATA_GET(obj, sd);
2535 const char *focus_raise; 2524 const char *focus_raise;
2536 2525
2537 if (it->generation < sd->generation)
2538 return;
2539
2540 if (_is_no_select(it) || 2526 if (_is_no_select(it) ||
2541 (eo_it == sd->focused_item) || 2527 (eo_it == sd->focused_item) ||
2542 (eo_do(eo_it, elm_wdg_item_disabled_get()))) 2528 (eo_do(eo_it, elm_wdg_item_disabled_get())))
@@ -2576,9 +2562,6 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
2576 Evas_Object *obj = WIDGET(it); 2562 Evas_Object *obj = WIDGET(it);
2577 ELM_GENLIST_DATA_GET(obj, sd); 2563 ELM_GENLIST_DATA_GET(obj, sd);
2578 2564
2579 if (it->generation < sd->generation)
2580 return;
2581
2582 if (_is_no_select(it)) 2565 if (_is_no_select(it))
2583 return; 2566 return;
2584 2567
@@ -2615,7 +2598,6 @@ _item_focused_next(Evas_Object *obj, Elm_Focus_Direction dir)
2615 return EINA_FALSE; 2598 return EINA_FALSE;
2616 2599
2617 while ((next) && 2600 while ((next) &&
2618 (next->generation < sd->generation) &&
2619 (!eo_do(EO_OBJ(next), elm_wdg_item_disabled_get()))) 2601 (!eo_do(EO_OBJ(next), elm_wdg_item_disabled_get())))
2620 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); 2602 next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next);
2621 } 2603 }
@@ -3348,7 +3330,6 @@ _item_highlight(Elm_Gen_Item *it)
3348 3330
3349 if (_is_no_select(it) || 3331 if (_is_no_select(it) ||
3350 (!sd->highlight) || 3332 (!sd->highlight) ||
3351 (it->generation < sd->generation) ||
3352 (it->highlighted) || eo_do(EO_OBJ(it), elm_wdg_item_disabled_get()) || 3333 (it->highlighted) || eo_do(EO_OBJ(it), elm_wdg_item_disabled_get()) ||
3353 (it->item->deco_it_view)) 3334 (it->item->deco_it_view))
3354 return; 3335 return;
@@ -3374,8 +3355,7 @@ _item_unhighlight(Elm_Gen_Item *it)
3374{ 3355{
3375 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 3356 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3376 3357
3377 if ((it->generation < GL_IT(it)->wsd->generation) || (!it->highlighted)) 3358 if (!it->highlighted) return;
3378 return;
3379 3359
3380 edje_object_signal_emit(VIEW(it), SIGNAL_UNSELECTED, "elm"); 3360 edje_object_signal_emit(VIEW(it), SIGNAL_UNSELECTED, "elm");
3381 evas_object_smart_callback_call(WIDGET(it), SIG_UNHIGHLIGHTED, EO_OBJ(it)); 3361 evas_object_smart_callback_call(WIDGET(it), SIG_UNHIGHLIGHTED, EO_OBJ(it));
@@ -3562,7 +3542,6 @@ _elm_genlist_item_del_not_serious(Elm_Gen_Item *it)
3562 Elm_Object_Item *eo_it = EO_OBJ(it); 3542 Elm_Object_Item *eo_it = EO_OBJ(it);
3563 3543
3564 eo_do(eo_it, elm_wdg_item_pre_notify_del()); 3544 eo_do(eo_it, elm_wdg_item_pre_notify_del());
3565 it->generation = sd->generation - 1; // This means that the item is deleted
3566 3545
3567 if (it->selected) 3546 if (it->selected)
3568 { 3547 {
@@ -3663,8 +3642,7 @@ _item_unselect(Elm_Gen_Item *it)
3663{ 3642{
3664 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 3643 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3665 3644
3666 if ((it->generation < sd->generation)) return; 3645 _item_unhighlight(it); /* unhighlight the item first */
3667 _item_unhighlight(it); /* unhighlight the item first */
3668 if (!it->selected) return; /* then check whether the item is selected */ 3646 if (!it->selected) return; /* then check whether the item is selected */
3669 3647
3670 if (GL_IT(it)->wsd->focus_on_selection_enabled) 3648 if (GL_IT(it)->wsd->focus_on_selection_enabled)
@@ -4942,8 +4920,7 @@ _decorate_item_finished_signal_cb(void *data,
4942 4920
4943 te = evas_object_evas_get(obj); 4921 te = evas_object_evas_get(obj);
4944 4922
4945 if ((it->generation < sd->generation) || (!it->realized) 4923 if ((!it->realized) || (!it->item->deco_it_view)) return;
4946 || (!it->item->deco_it_view)) return;
4947 4924
4948 evas_event_freeze(te); 4925 evas_event_freeze(te);
4949 it->item->nocache_once = EINA_FALSE; 4926 it->item->nocache_once = EINA_FALSE;
@@ -5010,7 +4987,6 @@ _item_block_recalc(Item_Block *itb,
5010 EINA_LIST_FOREACH(itb->items, l, it) 4987 EINA_LIST_FOREACH(itb->items, l, it)
5011 { 4988 {
5012 sd = GL_IT(it)->wsd; 4989 sd = GL_IT(it)->wsd;
5013 if (it->generation < sd->generation) continue;
5014 show_me |= it->item->show_me; 4990 show_me |= it->item->show_me;
5015 if (!itb->realized) 4991 if (!itb->realized)
5016 { 4992 {
@@ -5290,8 +5266,7 @@ _decorate_item_realize(Elm_Gen_Item *it)
5290 Evas_Object *obj = sd->obj; 5266 Evas_Object *obj = sd->obj;
5291 char buf[1024]; 5267 char buf[1024];
5292 5268
5293 if (it->generation < sd->generation) return; 5269 if (GL_IT(it)->deco_it_view) return;
5294 if (it->item->deco_it_view) return;
5295 5270
5296 evas_event_freeze(evas_object_evas_get(obj)); 5271 evas_event_freeze(evas_object_evas_get(obj));
5297 it->item->deco_it_view = _view_create(it, it->itc->decorate_item_style); 5272 it->item->deco_it_view = _view_create(it, it->itc->decorate_item_style);
@@ -5460,8 +5435,6 @@ _elm_genlist_evas_object_smart_add(Eo *obj, Elm_Genlist_Data *priv)
5460 elm_widget_can_focus_set(obj, EINA_TRUE); 5435 elm_widget_can_focus_set(obj, EINA_TRUE);
5461 elm_widget_on_show_region_hook_set(obj, _show_region_hook, NULL); 5436 elm_widget_on_show_region_hook_set(obj, _show_region_hook, NULL);
5462 5437
5463 priv->generation = 1;
5464
5465 if (!elm_layout_theme_set 5438 if (!elm_layout_theme_set
5466 (obj, "genlist", "base", elm_widget_style_get(obj))) 5439 (obj, "genlist", "base", elm_widget_style_get(obj)))
5467 CRI("Failed to set layout!"); 5440 CRI("Failed to set layout!");
@@ -5627,9 +5600,6 @@ _internal_elm_genlist_clear(Evas_Object *obj)
5627{ 5600{
5628 ELM_GENLIST_DATA_GET(obj, sd); 5601 ELM_GENLIST_DATA_GET(obj, sd);
5629 Elm_Gen_Item *it; 5602 Elm_Gen_Item *it;
5630 Eina_Inlist *l, *next;
5631
5632 sd->generation++;
5633 5603
5634 _elm_genlist_item_unfocused(sd->focused_item); 5604 _elm_genlist_item_unfocused(sd->focused_item);
5635 if (sd->mode_item) sd->mode_item = NULL; 5605 if (sd->mode_item) sd->mode_item = NULL;
@@ -5643,8 +5613,7 @@ _internal_elm_genlist_clear(Evas_Object *obj)
5643 while (sd->items) 5613 while (sd->items)
5644 { 5614 {
5645 it = EINA_INLIST_CONTAINER_GET(sd->items->last, Elm_Gen_Item); 5615 it = EINA_INLIST_CONTAINER_GET(sd->items->last, Elm_Gen_Item);
5646 if (it->generation < sd->generation) 5616 eo_do(EO_OBJ(it), elm_wdg_item_del());
5647 eo_do(EO_OBJ(it), elm_wdg_item_del());
5648 } 5617 }
5649 sd->pan_changed = EINA_TRUE; 5618 sd->pan_changed = EINA_TRUE;
5650 if (!sd->queue) 5619 if (!sd->queue)
@@ -5690,7 +5659,6 @@ _item_select(Elm_Gen_Item *it)
5690 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 5659 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
5691 Elm_Object_Item *eo_it = EO_OBJ(it); 5660 Elm_Object_Item *eo_it = EO_OBJ(it);
5692 5661
5693 if (it->generation < sd->generation) return EINA_FALSE;
5694 if (eo_do(eo_it, elm_wdg_item_disabled_get())) return EINA_FALSE; 5662 if (eo_do(eo_it, elm_wdg_item_disabled_get())) return EINA_FALSE;
5695 if (_is_no_select(it) || (it->decorate_it_set)) return EINA_FALSE; 5663 if (_is_no_select(it) || (it->decorate_it_set)) return EINA_FALSE;
5696 if ((sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS) && 5664 if ((sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS) &&
@@ -5798,8 +5766,6 @@ _elm_genlist_item_elm_widget_item_disable(Eo *eo_it, Elm_Gen_Item *it)
5798 Eina_List *l; 5766 Eina_List *l;
5799 Evas_Object *obj; 5767 Evas_Object *obj;
5800 5768
5801 if (it->generation < GL_IT(it)->wsd->generation) return;
5802
5803 _item_unselect(it); 5769 _item_unselect(it);
5804 if (eo_it == GL_IT(it)->wsd->focused_item) 5770 if (eo_it == GL_IT(it)->wsd->focused_item)
5805 _elm_genlist_item_unfocused(eo_it); 5771 _elm_genlist_item_unfocused(eo_it);
@@ -5912,7 +5878,6 @@ _elm_genlist_item_new(Elm_Genlist_Data *sd,
5912 if (!eo_it) return NULL; 5878 if (!eo_it) return NULL;
5913 ELM_GENLIST_ITEM_DATA_GET(eo_it, it); 5879 ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
5914 5880
5915 it->generation = sd->generation;
5916 it->itc = itc; 5881 it->itc = itc;
5917 elm_genlist_item_class_ref((Elm_Genlist_Item_Class *)itc); 5882 elm_genlist_item_class_ref((Elm_Genlist_Item_Class *)itc);
5918 5883
@@ -6434,15 +6399,7 @@ _elm_genlist_at_xy_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Evas_Coor
6434EOLIAN static Elm_Object_Item* 6399EOLIAN static Elm_Object_Item*
6435_elm_genlist_first_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd) 6400_elm_genlist_first_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
6436{ 6401{
6437 Elm_Gen_Item *it; 6402 return EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(sd->items));
6438
6439 if (!sd->items) return NULL;
6440
6441 it = ELM_GEN_ITEM_FROM_INLIST(sd->items);
6442 while ((it) && (it->generation < sd->generation))
6443 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
6444
6445 return EO_OBJ(it);
6446} 6403}
6447 6404
6448EOLIAN static Elm_Object_Item* 6405EOLIAN static Elm_Object_Item*
@@ -6453,8 +6410,6 @@ _elm_genlist_last_item_get(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd)
6453 if (!sd->items) return NULL; 6410 if (!sd->items) return NULL;
6454 6411
6455 it = ELM_GEN_ITEM_FROM_INLIST(sd->items->last); 6412 it = ELM_GEN_ITEM_FROM_INLIST(sd->items->last);
6456 while ((it) && (it->generation < sd->generation))
6457 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
6458 6413
6459 return EO_OBJ(it); 6414 return EO_OBJ(it);
6460} 6415}
@@ -6465,7 +6420,7 @@ _elm_genlist_item_next_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6465 while (it) 6420 while (it)
6466 { 6421 {
6467 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next); 6422 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
6468 if ((it) && (it->generation == GL_IT(it)->wsd->generation)) break; 6423 if (it) break;
6469 } 6424 }
6470 6425
6471 if (it) return EO_OBJ(it); 6426 if (it) return EO_OBJ(it);
@@ -6478,7 +6433,7 @@ _elm_genlist_item_prev_get(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6478 while (it) 6433 while (it)
6479 { 6434 {
6480 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); 6435 it = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
6481 if ((it) && (it->generation == GL_IT(it)->wsd->generation)) break; 6436 if (it) break;
6482 } 6437 }
6483 6438
6484 if (it) return EO_OBJ(it); 6439 if (it) return EO_OBJ(it);
@@ -6539,10 +6494,8 @@ _elm_genlist_item_selected_set(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
6539 Eina_Bool selected) 6494 Eina_Bool selected)
6540{ 6495{
6541 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 6496 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6542 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
6543 6497
6544 if ((it->generation < sd->generation) || 6498 if (eo_do(EO_OBJ(it), elm_wdg_item_disabled_get())) return;
6545 eo_do(EO_OBJ(it), elm_wdg_item_disabled_get())) return;
6546 6499
6547 selected = !!selected; 6500 selected = !!selected;
6548 if (it->selected == selected) return; 6501 if (it->selected == selected) return;
@@ -6710,7 +6663,6 @@ _elm_genlist_item_coordinates_calc(Elm_Gen_Item *it,
6710 Evas_Coord gith = 0; 6663 Evas_Coord gith = 0;
6711 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 6664 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
6712 6665
6713 if (it->generation < sd->generation) return EINA_FALSE;
6714 if ((sd->queue) || 6666 if ((sd->queue) ||
6715 (!((sd->homogeneous) && 6667 (!((sd->homogeneous) &&
6716 (sd->mode == ELM_LIST_COMPRESS)))) 6668 (sd->mode == ELM_LIST_COMPRESS))))
@@ -6765,7 +6717,6 @@ _elm_genlist_item_promote(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6765{ 6717{
6766 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 6718 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6767 6719
6768 if (it->generation < GL_IT(it)->wsd->generation) return;
6769 Elm_Object_Item *eo_first_item = elm_genlist_first_item_get(WIDGET(it)); 6720 Elm_Object_Item *eo_first_item = elm_genlist_first_item_get(WIDGET(it));
6770 ELM_GENLIST_ITEM_DATA_GET(eo_first_item, first_item); 6721 ELM_GENLIST_ITEM_DATA_GET(eo_first_item, first_item);
6771 _item_move_before(it, first_item); 6722 _item_move_before(it, first_item);
@@ -6775,7 +6726,6 @@ EOLIAN static void
6775_elm_genlist_item_demote(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it) 6726_elm_genlist_item_demote(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
6776{ 6727{
6777 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 6728 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6778 if (it->generation < GL_IT(it)->wsd->generation) return;
6779 Elm_Object_Item *eo_last_item = elm_genlist_last_item_get(WIDGET(it)); 6729 Elm_Object_Item *eo_last_item = elm_genlist_last_item_get(WIDGET(it));
6780 ELM_GENLIST_ITEM_DATA_GET(eo_last_item, last_item); 6730 ELM_GENLIST_ITEM_DATA_GET(eo_last_item, last_item);
6781 _item_move_after(it, last_item); 6731 _item_move_after(it, last_item);
@@ -6829,7 +6779,6 @@ _elm_genlist_item_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6829 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 6779 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
6830 6780
6831 if (!it->item->block) return; 6781 if (!it->item->block) return;
6832 if (it->generation < sd->generation) return;
6833 it->item->mincalcd = EINA_FALSE; 6782 it->item->mincalcd = EINA_FALSE;
6834 it->item->updateme = EINA_TRUE; 6783 it->item->updateme = EINA_TRUE;
6835 it->item->block->updateme = EINA_TRUE; 6784 it->item->block->updateme = EINA_TRUE;
@@ -6845,7 +6794,6 @@ _elm_genlist_item_fields_update(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it,
6845 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 6794 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
6846 6795
6847 if (!it->item->block) return; 6796 if (!it->item->block) return;
6848 if (it->generation < GL_IT(it)->wsd->generation) return;
6849 6797
6850 if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_TEXT)) 6798 if ((!itf) || (itf & ELM_GENLIST_ITEM_FIELD_TEXT))
6851 { 6799 {
@@ -6900,7 +6848,6 @@ _elm_genlist_item_item_class_update(Eo *eo_it, Elm_Gen_Item *it,
6900 EINA_SAFETY_ON_NULL_RETURN(itc); 6848 EINA_SAFETY_ON_NULL_RETURN(itc);
6901 it->itc = itc; 6849 it->itc = itc;
6902 if (!it->item->block) return; 6850 if (!it->item->block) return;
6903 if (it->generation < GL_IT(it)->wsd->generation) return;
6904 it->item->nocache_once = EINA_TRUE; 6851 it->item->nocache_once = EINA_TRUE;
6905 6852
6906 ELM_SAFE_FREE(it->texts, elm_widget_stringlist_free); 6853 ELM_SAFE_FREE(it->texts, elm_widget_stringlist_free);
@@ -6914,7 +6861,6 @@ EOLIAN static const Elm_Genlist_Item_Class *
6914_elm_genlist_item_item_class_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it) 6861_elm_genlist_item_item_class_get(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *it)
6915{ 6862{
6916 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL); 6863 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it, NULL);
6917 if (it->generation < GL_IT(it)->wsd->generation) return NULL;
6918 6864
6919 return it->itc; 6865 return it->itc;
6920} 6866}
@@ -7317,8 +7263,7 @@ _elm_genlist_item_decorate_mode_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it,
7317 sd = GL_IT(it)->wsd; 7263 sd = GL_IT(it)->wsd;
7318 7264
7319 if (!decorate_it_type) return; 7265 if (!decorate_it_type) return;
7320 if ((it->generation < sd->generation) || 7266 if (eo_do(eo_it, elm_wdg_item_disabled_get())) return;
7321 eo_do(eo_it, elm_wdg_item_disabled_get())) return;
7322 if (sd->decorate_all_mode) return; 7267 if (sd->decorate_all_mode) return;
7323 7268
7324 if ((sd->mode_item == it) && 7269 if ((sd->mode_item == it) &&
@@ -7636,8 +7581,6 @@ _elm_genlist_item_select_mode_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it,
7636 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it); 7581 ELM_GENLIST_ITEM_CHECK_OR_RETURN(it);
7637 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 7582 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
7638 7583
7639 if (it->generation < sd->generation) return;
7640
7641 if ((mode >= ELM_OBJECT_SELECT_MODE_MAX) || (it->select_mode == mode)) 7584 if ((mode >= ELM_OBJECT_SELECT_MODE_MAX) || (it->select_mode == mode))
7642 return; 7585 return;
7643 7586
diff --git a/src/lib/elm_widget_genlist.h b/src/lib/elm_widget_genlist.h
index 9df282249..d16c3940e 100644
--- a/src/lib/elm_widget_genlist.h
+++ b/src/lib/elm_widget_genlist.h
@@ -123,9 +123,6 @@ struct _Elm_Genlist_Data
123 * default. this can be changed by 123 * default. this can be changed by
124 * elm_genlist_longpress_timeout_set() */ 124 * elm_genlist_longpress_timeout_set() */
125 double longpress_timeout; 125 double longpress_timeout;
126 /* a generation of genlist. when genlist is cleared, this value
127 * will be increased and a new generation will start */
128 int generation;
129 Eina_Compare_Cb item_compare_cb; 126 Eina_Compare_Cb item_compare_cb;
130 Eina_Compare_Cb item_compare_data_cb; 127 Eina_Compare_Cb item_compare_data_cb;
131 128
@@ -177,9 +174,6 @@ struct _Elm_Genlist_Data
177 Eina_Bool on_sub_del : 1; 174 Eina_Bool on_sub_del : 1;
178 175
179 Eina_Bool highlight : 1; 176 Eina_Bool highlight : 1;
180 /* a flag whether genlist is marked as to be cleared or not. if
181 * this flag is true, genlist clear was already deferred. */
182 Eina_Bool clear_me : 1;
183 Eina_Bool h_bounce : 1; 177 Eina_Bool h_bounce : 1;
184 Eina_Bool v_bounce : 1; 178 Eina_Bool v_bounce : 1;
185 Eina_Bool bring_in : 1; /* a flag to 179 Eina_Bool bring_in : 1; /* a flag to