genlist/gengrid : Add upadating 'focus' state in item realized function.
authorSangHyeon Lee <sh10233.lee@samsung.com>
Mon, 23 Feb 2015 08:57:01 +0000 (17:57 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Mon, 23 Feb 2015 08:57:01 +0000 (17:57 +0900)
Summary:
When an item is realized, select/disable/expand signal emission to the view object of an item was handled correctly,but there are no updating code for focus state.

@fix

Test Plan: tested by editing genlist/genlist item edc to react on elm,state,focused and move scroll signals to unrealized/realized item again.

Reviewers: raster, seoz

Reviewed By: seoz

Subscribers: eunue

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

src/lib/elm_gengrid.c
src/lib/elm_genlist.c

index 60e7fa5..0fcf37f 100644 (file)
@@ -992,6 +992,9 @@ _item_realize(Elm_Gen_Item *it)
           edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
         if (eo_do(eo_it, elm_wdg_item_disabled_get()))
           edje_object_signal_emit(VIEW(it), "elm,state,disabled", "elm");
+        if (it == (Elm_Gen_Item *)sd->focused_item &&
+            elm_widget_focus_highlight_enabled_get(WIDGET(it)))
+          edje_object_signal_emit(VIEW(it), "elm,state,focused", "elm");
      }
    edje_object_message_signal_process(VIEW(it));
    evas_object_show(VIEW(it));
index 5a84d30..da02d8d 100644 (file)
@@ -1240,6 +1240,9 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it,
                  (it->deco_all_view, SIGNAL_EXPANDED, "elm");
           }
      }
+   if (it == (Elm_Gen_Item *)GL_IT(it)->wsd->focused_item &&
+       elm_widget_focus_highlight_enabled_get(WIDGET(it)))
+     edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm");
 }
 
 static void