From cf9e70b3daeba4d2b87ce8c79cbfed367b80e8a4 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 Conflicts: src/lib/elm_genlist.c --- src/lib/elm_genlist.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 23ce40c..60a4703 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -1104,8 +1104,28 @@ _item_mode_content_realize(Elm_Gen_Item *it, // 1. Add resize callback for multiline entry. // 2. Do not unrealize it for focus issue // ps. Only for entry because of performnace - if (!strcmp("elm_entry", evas_object_type_get(ic))) - it->item->unrealize_disabled = EINA_TRUE; + if (!strcmp("elm_layout", evas_object_type_get(ic))) + { + // If editfield style, it can have entry. + const char *group; + edje_object_file_get(elm_layout_edje_get(ic), NULL, &group); + if (group && !strncmp("elm/layout/editfield/", group, 20)) + { + 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)) && + !elm_entry_single_line_get(ic)) + it->item->unrealize_disabled = EINA_TRUE; + } #endif #if 0 @@ -1387,7 +1407,26 @@ _item_content_realize(Elm_Gen_Item *it, // 1. Add resize callback for multiline entry. // 2. Do not unrealize it for focus issue // ps. Only for entry because of performnace - if (!strcmp("elm_entry", evas_object_type_get(ic))) + if (!strcmp("elm_layout", evas_object_type_get(ic))) + { + // If editfield style, it can have entry. + const char *group; + edje_object_file_get(elm_layout_edje_get(ic), NULL, &group); + if (group && !strncmp("elm/layout/editfield/", group, 20)) + { + 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)) && + !elm_entry_single_line_get(ic)) { if (!elm_entry_single_line_get(ic)) evas_object_event_callback_add -- 2.7.4