seoz pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=a6d73966de31b996b79129a3ffb4007751af2f5e
commit a6d73966de31b996b79129a3ffb4007751af2f5e Author: Daniel Juyung Seo <[email protected]> Date: Tue Feb 4 00:30:37 2014 +0900 Colorselector: Item_signal_emit_hook added. Summary: Issue: If application has to preselect an item, or change item properties by customizing theme there is no option provided for the same. Solution: Add item_signal_emit_hook. Signed-off by: Shilpa Singh <[email protected]> Test Plan: Send a signal to item and verify UI Elm_Object_Item *item = elm_colorselector_palette_color_add(cs, 133, 100, 255, 255); elm_object_item_signal_emit(item, "elm,state,selected", "elm"); Reviewers: seoz, Hermet Reviewed By: seoz CC: govi Differential Revision: https://phab.enlightenment.org/D504 --- src/lib/elm_colorselector.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/elm_colorselector.c b/src/lib/elm_colorselector.c index 3aa84d1..fddd110 100644 --- a/src/lib/elm_colorselector.c +++ b/src/lib/elm_colorselector.c @@ -1372,6 +1372,14 @@ _item_resize(void *data EINA_UNUSED, elm_layout_sizing_eval(obj); } +static void +_item_signal_emit_hook(Elm_Object_Item *it, + const char *emission, + const char *source) +{ + elm_object_signal_emit(VIEW(it), emission, source); +} + static Elm_Color_Item * _item_new(Evas_Object *obj) { @@ -1404,6 +1412,8 @@ _item_new(Evas_Object *obj) (item->color_obj, EVAS_CALLBACK_MOUSE_UP, _on_color_released, item); elm_object_part_content_set(VIEW(item), "color_obj", item->color_obj); + elm_widget_item_signal_emit_hook_set(item, _item_signal_emit_hook); + _item_sizing_eval(item); evas_object_show(VIEW(item)); --
