From: Tae-Hwan Kim Date: Thu, 20 Jun 2013 12:53:39 +0000 (+0900) Subject: [Genlist] Fix update operation. X-Git-Tag: accepted/tizen/20130927.071315^2~144 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b315636d44c903cd6cfdb4755b4b0987689dbc97;p=profile%2Fmobile%2Felementary.git [Genlist] Fix update operation. If item is already realized, only update needed things. If not, accessibility object will be removed and highlight will be gone away. Change-Id: I59d64489338a6af243b2c8d99dc811943d39a8b4 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index f2e735a..c261478 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -4574,6 +4574,71 @@ _item_block_recalc(Item_Block *itb, return show_me; } +static void _item_update(Elm_Gen_Item *it) +{ + if (!it->realized) return; + + if (it->texts) elm_widget_stringlist_free(it->texts); + it->texts = NULL; + if (it->states) elm_widget_stringlist_free(it->states); + it->states = NULL; + // unrealization + it->content_objs = _item_content_unrealize(it, VIEW(it), + &it->contents, NULL); + it->item->deco_all_content_objs = + _item_mode_content_unrealize + (it, it->deco_all_view, &it->item->deco_all_contents, NULL, + &it->item->deco_all_content_objs); + + it->item->deco_it_content_objs = + _item_mode_content_unrealize(it, it->item->deco_it_view, + &it->item->deco_it_contents, NULL, + &it->item->deco_it_content_objs); + + it->item->flip_content_objs = + _item_mode_content_unrealize(it, VIEW(it), + &it->item->flip_contents, NULL, + &it->item->flip_content_objs); + + // realization + _item_text_realize(it, VIEW(it), &it->texts, NULL); + _item_state_realize(it, VIEW(it), &it->states, NULL); + it->content_objs = _item_content_realize(it, VIEW(it), + &it->contents, NULL); + if (GL_IT(it)->wsd->decorate_all_mode) + { + it->item->deco_all_content_objs = + _item_mode_content_realize(it, it->deco_all_view, + &it->item->deco_all_contents, NULL, + &it->item->deco_all_content_objs); + } + + if (it->item->deco_it_view) + { + it->item->deco_it_content_objs = + _item_mode_content_realize(it, it->item->deco_it_view, + &it->item->deco_it_contents, NULL, + &it->item->deco_it_content_objs); + } + + if (it->flipped) + { + edje_object_signal_emit + (VIEW(it), "elm,state,flip,enabled", "elm"); + // This is needed before contents are swallowed + edje_object_message_signal_process(VIEW(it)); + + if (!(it->item->flip_contents)) + it->item->flip_contents = elm_widget_stringlist_get + (edje_object_data_get(VIEW(it), "flips")); + it->item->flip_content_objs = _item_mode_content_realize + (it, VIEW(it), &it->item->flip_contents, NULL, + &it->item->flip_content_objs); + } + _item_min_calc(it, NULL, NULL); + +} + static void _update_job(void *data) { @@ -4611,8 +4676,7 @@ _update_job(void *data) it->item->updateme = EINA_FALSE; if (it->realized) { - _item_unrealize(it, EINA_FALSE); - _item_realize(it, num, EINA_FALSE); + _item_update(it); position = EINA_TRUE; } else