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 09:52:20 +0000 (18:52 +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 3396211a36f268735c25abf7226296319dddf73a..5c01ee75753010b9409f01b74862d58315ded1a7 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 13cb1ed9e324584e416698702757cb4f4b5a1541..f659bd798a594cd598c255e50bc6f568d2f19dad 100644 (file)
@@ -1238,6 +1238,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