From e098fbf72d33457e0ebd9be5d3affa463cf4ff00 Mon Sep 17 00:00:00 2001 From: SangHyeon Lee Date: Wed, 26 Oct 2016 14:30:54 +0900 Subject: [PATCH] genlist : fix building error about hide flag Change-Id: I1bc1b732912368c8a557891b0d898d2c8a42c4aa Signed-off-by: SangHyeon Lee --- src/lib/elm_genlist.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index eb9187a..4820bb8 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -2355,7 +2355,7 @@ _item_block_position(Item_Block *itb, if (sd->reorder_it == it) continue; if (!it->filtered) _item_filtered_get(it); - if (it->hide) + if (it->want_hidden) { if (it->realized) evas_object_hide(VIEW(it)); continue; @@ -2605,7 +2605,7 @@ _item_multi_select_up(Elm_Genlist_Data *sd) { ELM_GENLIST_ITEM_DATA_GET(eo_prev, prev); if ((!_is_no_select(prev)) && - (!elm_object_item_disabled_get(eo_prev)) && (!prev->hide)) + (!elm_object_item_disabled_get(eo_prev)) && (!prev->want_hidden)) break; eo_prev = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev)); } @@ -2636,7 +2636,7 @@ _item_multi_select_down(Elm_Genlist_Data *sd) { ELM_GENLIST_ITEM_DATA_GET(eo_next, next); if ((!_is_no_select(next)) && - (!elm_object_item_disabled_get(eo_next)) && (!next->hide)) + (!elm_object_item_disabled_get(eo_next)) && (!next->want_hidden)) break; eo_next = EO_OBJ(ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next)); } @@ -2689,7 +2689,7 @@ _item_single_select_up(Elm_Genlist_Data *sd) while (prev) { if ((!_is_no_select(prev)) && - (!elm_object_item_disabled_get(EO_OBJ(prev))) && (!prev->hide)) + (!elm_object_item_disabled_get(EO_OBJ(prev))) && (!prev->want_hidden)) break; prev = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(prev)->prev); } @@ -2719,7 +2719,7 @@ _item_single_select_down(Elm_Genlist_Data *sd) while (next) { if ((!_is_no_select(next)) && - (!elm_object_item_disabled_get(EO_OBJ(next))) && (!next->hide)) + (!elm_object_item_disabled_get(EO_OBJ(next))) && (!next->want_hidden)) break; next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); } @@ -2819,7 +2819,7 @@ _item_focused_next(Evas_Object *obj, Elm_Focus_Direction dir) while ((next) && ((eo_do_ret(EO_OBJ(next), tmp, elm_wdg_item_disabled_get())) || (_is_no_select(next)))) - if (!next->hide) next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); + if (!next->want_hidden) next = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(next)->next); } else { @@ -5212,7 +5212,7 @@ _item_block_recalc(Item_Block *itb, show_me |= it->item->show_me; if (!it->filtered) _item_filtered_get(it); - if (it->hide) + if (it->want_hidden) { if (it->realized) evas_object_hide(VIEW(it)); continue; @@ -5767,7 +5767,7 @@ _access_obj_process(Elm_Genlist_Data *sd, Eina_Bool is_access) done = EINA_TRUE; EINA_LIST_FOREACH(itb->items, l, it) { - if (!it->realized || it->hide) continue; + if (!it->realized || it->want_hidden) continue; if (is_access) _access_widget_item_register(it); else _elm_access_widget_item_unregister(it->base); @@ -5804,7 +5804,7 @@ _elm_genlist_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, Eina_Bo done = EINA_TRUE; EINA_LIST_FOREACH(itb->items, l, it) { - if (!it->realized || it->hide) continue; + if (!it->realized || it->want_hidden) continue; if (is_atspi) { elm_interface_atspi_accessible_added(EO_OBJ(it)); @@ -7058,6 +7058,12 @@ _elm_genlist_item_show(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item, Elm_Genlist_ ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); + if (item->want_hidden) + { + WRN("Filter hided item cannot move to show"); + return; + } + if (_elm_genlist_item_coordinates_calc (item, type, EINA_FALSE, &x, &y, &w, &h)) eo_do(WIDGET(item), elm_interface_scrollable_content_region_show @@ -7071,6 +7077,12 @@ _elm_genlist_item_bring_in(Eo *eo_item EINA_UNUSED, Elm_Gen_Item *item, Elm_Genl ELM_GENLIST_ITEM_CHECK_OR_RETURN(item); + if (item->want_hidden) + { + WRN("Filter hided item cannot move to bring in"); + return; + } + if (_elm_genlist_item_coordinates_calc (item, type, EINA_TRUE, &x, &y, &w, &h)) eo_do(WIDGET(item), elm_interface_scrollable_region_bring_in(x, y, w, h)); @@ -7558,7 +7570,8 @@ _filter_item_internal(Elm_Gen_Item *it) (void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), sd->filter_data))) { - it->hide = EINA_TRUE; + it->want_hidden = EINA_TRUE; + if (sd->show_item == it) sd->show_item = NULL; it->item->block->changed = EINA_TRUE; } else @@ -7593,7 +7606,7 @@ _item_filtered_get(Elm_Gen_Item *it) ELM_SAFE_FREE(sd->calc_job, ecore_job_del); sd->calc_job = ecore_job_add(_calc_job, sd->obj); } - if (!it->hide) return EINA_TRUE; + if (!it->want_hidden) return EINA_TRUE; return EINA_FALSE; } @@ -7686,7 +7699,7 @@ _elm_genlist_filter_set(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, void *filter_ EINA_LIST_FOREACH(itb->items, l, it) { it->filtered = EINA_FALSE; - it->hide = EINA_FALSE; + it->want_hidden = EINA_FALSE; if (it->realized) _filter_item_internal(it); else @@ -7699,7 +7712,7 @@ _elm_genlist_filter_set(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, void *filter_ EINA_LIST_FOREACH(itb->items, l, it) { it->filtered = EINA_FALSE; - it->hide = EINA_FALSE; + it->want_hidden = EINA_FALSE; sd->filter_queue = eina_list_append(sd->filter_queue, it); } } -- 2.7.4