seoz pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=b41cf11a151107b2b9e3162b7cc5c9c874f6fed5
commit b41cf11a151107b2b9e3162b7cc5c9c874f6fed5 Author: Daniel Juyung Seo <[email protected]> Date: Mon Oct 14 13:53:27 2013 +0900 elc_hoversel: Support elm_object_item_signal_emit() in hoversel. This works only when the item is actually created by clicking the hover button. --- ChangeLog | 5 +++++ NEWS | 1 + src/lib/elc_hoversel.c | 14 ++++++++++++-- src/lib/elc_hoversel.h | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec783e7..68aba3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1694,3 +1694,8 @@ * popup : Change the behavior about adding or removing buttons to keep the user defined position of button. + +2013-10-14 Daniel Juyung Seo (SeoZ) + + * hoversel: Support elm_object_item_signal_emit in hoversel. This works + only when the item is created. diff --git a/NEWS b/NEWS index 9af5355..a3bea3f 100644 --- a/NEWS +++ b/NEWS @@ -96,6 +96,7 @@ Additions: * Add elm_menu_item_subitems_clear(). * Add the configuration fileselector_double_tap_navigation_enable. * Add "activated" smart callback for fileselector. + * Add elm_object_item_signal_emit support in hoversel. This works only when the item is created. Improvements: diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c index 9f47c6e..b7ba0ee 100644 --- a/src/lib/elc_hoversel.c +++ b/src/lib/elc_hoversel.c @@ -97,7 +97,7 @@ _on_item_clicked(void *data, static void _activate(Evas_Object *obj) { - const Elm_Hoversel_Item *item; + Elm_Hoversel_Item *item; Evas_Object *bt, *bx, *ic; const Eina_List *l; char buf[4096]; @@ -145,7 +145,7 @@ _activate(Evas_Object *obj) EINA_LIST_FOREACH(sd->items, l, item) { - bt = elm_button_add(bx); + VIEW(item) = bt = elm_button_add(bx); elm_widget_mirrored_automatic_set(bt, EINA_FALSE); elm_widget_mirrored_set(bt, elm_widget_mirrored_get(obj)); elm_object_style_set(bt, buf); @@ -204,6 +204,15 @@ _item_text_get_hook(const Elm_Object_Item *it, return ((Elm_Hoversel_Item *)it)->label; } +static void +_item_signal_emit_hook(Elm_Object_Item *it, + const char *emission, + const char *source) +{ + if (VIEW(it)) + elm_object_signal_emit(VIEW(it), emission, source); +} + static Eina_Bool _item_del_pre_hook(Elm_Object_Item *it) { @@ -508,6 +517,7 @@ _item_add(Eo *obj, void *_pd, va_list *list) elm_widget_item_del_pre_hook_set(item, _item_del_pre_hook); elm_widget_item_text_get_hook_set(item, _item_text_get_hook); + elm_widget_item_signal_emit_hook_set(item, _item_signal_emit_hook); item->label = eina_stringshare_add(label); item->icon_file = eina_stringshare_add(icon_file); diff --git a/src/lib/elc_hoversel.h b/src/lib/elc_hoversel.h index d085491..afc2904 100644 --- a/src/lib/elc_hoversel.h +++ b/src/lib/elc_hoversel.h @@ -43,6 +43,7 @@ * Supported elm_object_item common APIs. * @li elm_object_item_del * @li elm_object_item_part_text_get + * @li elm_object_item_signal_emit - this works only when the item is created. * * See @ref tutorial_hoversel for an example. * @{ --
