[Genlist] Reduce useless changed_job
authorTae-Hwan Kim <the81.kim@samsung.com>
Sat, 6 Apr 2013 05:02:56 +0000 (14:02 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 04:13:27 +0000 (13:13 +0900)
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

index 23ce40c..60a4703 100644 (file)
@@ -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