forked from enlightenment/efl
elc_hoversel: Support elm_object_item_signal_emit() in hoversel.
This works only when the item is actually created by clicking the hover button.
This commit is contained in:
parent
4314560b49
commit
07136563ea
|
@ -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.
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
* @{
|
||||
|
|
Loading…
Reference in New Issue