genlist: remove annoying error message
authorwonguk.jeong <wonguk.jeong@samsung.com>
Tue, 15 Jul 2014 03:07:07 +0000 (12:07 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Tue, 15 Jul 2014 03:07:10 +0000 (12:07 +0900)
Summary:
content couldn't be always a elm widget.
After checking whether it's elm widget or not, use widget API

Test Plan:
terminology -> options -> font -> select font and check below error message

ERR<25935>:eo lib/eo/eo.c:603 _eo_call_resolve() in elm_widget.eo.c:8: you called func 'elm_obj_widget_focus_get' (213) which is unknown in class 'Edje_Object'.

Reviewers: raster, cedric, seoz, Hermet

Reviewed By: Hermet

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D1186

legacy/elementary/src/lib/elm_genlist.c

index 5f7094e..7e83c89 100644 (file)
@@ -5525,10 +5525,10 @@ _item_select(Elm_Gen_Item *it)
         Eina_List *l;
         EINA_LIST_FOREACH(it->content_objs, l, swallow_obj)
           {
-             if (elm_object_focus_get(swallow_obj))
+             if (elm_widget_is(swallow_obj) && elm_object_focus_get(swallow_obj))
                {
-                  elm_object_focus_set( obj, EINA_FALSE);
-                  elm_object_focus_set( obj, EINA_TRUE);
+                  elm_object_focus_set(obj, EINA_FALSE);
+                  elm_object_focus_set(obj, EINA_TRUE);
                   break;
                }
           }