From 45cf19780ab476cae49deed7ff568306bb587ea7 Mon Sep 17 00:00:00 2001 From: Tae-Hwan Kim Date: Sat, 6 Apr 2013 14:02:56 +0900 Subject: [PATCH] [Genlist] Reduce useless changed_job 1. If entry is not used in editfield layout. 2. If entry is not used as single line Change-Id: Ic26d4ebe8fe30a1f94b9f3c0d8d2f11daaeb6aea --- src/lib/elm_genlist.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 50082b8..724ea61 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -1091,10 +1091,22 @@ _item_mode_content_realize(Elm_Gen_Item *it, const char *group; edje_object_file_get(elm_layout_edje_get(ic), NULL, &group); if (group && !strncmp("elm/layout/editfield/", group, 20)) - it->item->unrealize_disabled = EINA_TRUE; + { + Eina_List *ll; + Evas_Object *subobj; + Eina_List *subobjs = elm_widget_sub_object_list_get(ic); + EINA_LIST_FOREACH(subobjs, ll, subobj) + { + if (!strcmp("elm_entry", evas_object_type_get(subobj)) && + !elm_entry_single_line_get(subobj)) + it->item->unrealize_disabled = EINA_TRUE; + } + } } - else if (!strcmp("elm_entry", evas_object_type_get(ic))) + else if (!strcmp("elm_entry", evas_object_type_get(ic)) && + !elm_entry_single_line_get(ic)) it->item->unrealize_disabled = EINA_TRUE; + } #endif #if 0 @@ -1383,14 +1395,19 @@ _item_content_realize(Elm_Gen_Item *it, edje_object_file_get(elm_layout_edje_get(ic), NULL, &group); if (group && !strncmp("elm/layout/editfield/", group, 20)) { - evas_object_event_callback_add - (ic, EVAS_CALLBACK_CHANGED_SIZE_HINTS, - _changed_size_hints, it); - it->item->unrealize_disabled = EINA_TRUE; + Eina_List *ll; + Evas_Object *subobj; + Eina_List *subobjs = elm_widget_sub_object_list_get(ic); + EINA_LIST_FOREACH(subobjs, ll, subobj) + { + if (!strcmp("elm_entry", evas_object_type_get(subobj)) && + !elm_entry_single_line_get(subobj)) + it->item->unrealize_disabled = EINA_TRUE; + } } - } - else if (!strcmp("elm_entry", evas_object_type_get(ic))) + else if (!strcmp("elm_entry", evas_object_type_get(ic)) && + !elm_entry_single_line_get(ic)) { evas_object_event_callback_add (ic, EVAS_CALLBACK_CHANGED_SIZE_HINTS, -- 2.7.4