multibuttonentry: when item is clicked/selected, select function not called issue fix.
Summary: The select function set in item_append does not get called on item selection issue fix. As per documentation, the function has to get called. @fix Test Plan: elementary_test is updated with the demo Reviewers: navnbeet, Hermet, CHAN, cedric Reviewed By: cedric Differential Revision: https://phab.enlightenment.org/D3158 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
d0b244313e
commit
ffaee8f599
|
@ -171,6 +171,13 @@ _format_change_btn_add(Evas_Object *mbe)
|
||||||
return btn;
|
return btn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_select_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||||
|
{
|
||||||
|
Elm_Object_Item *it = (Elm_Object_Item *)event_info;
|
||||||
|
printf("select function called, item = %s\n", elm_object_item_text_get(it));
|
||||||
|
}
|
||||||
|
|
||||||
static Evas_Object*
|
static Evas_Object*
|
||||||
_add_multibuttonentry(Evas_Object *parent)
|
_add_multibuttonentry(Evas_Object *parent)
|
||||||
{
|
{
|
||||||
|
@ -190,6 +197,7 @@ _add_multibuttonentry(Evas_Object *parent)
|
||||||
evas_object_size_hint_weight_set(mbe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(mbe, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
evas_object_size_hint_align_set(mbe, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
evas_object_size_hint_align_set(mbe, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
elm_object_content_set(scr, mbe);
|
elm_object_content_set(scr, mbe);
|
||||||
|
elm_multibuttonentry_item_append(mbe, "mbe", _select_cb, NULL);
|
||||||
|
|
||||||
// Add item verify callback to Multibuttonentry
|
// Add item verify callback to Multibuttonentry
|
||||||
elm_multibuttonentry_item_filter_append(mbe, _item_filter_cb, data);
|
elm_multibuttonentry_item_filter_append(mbe, _item_filter_cb, data);
|
||||||
|
|
|
@ -464,6 +464,9 @@ _item_select(Evas_Object *obj,
|
||||||
if (it)
|
if (it)
|
||||||
{
|
{
|
||||||
_current_item_change(obj, EO_OBJ(it));
|
_current_item_change(obj, EO_OBJ(it));
|
||||||
|
|
||||||
|
if (it->func) it->func((void *)(WIDGET_ITEM_DATA_GET(EO_OBJ(it))), WIDGET(it), EO_OBJ(it));
|
||||||
|
|
||||||
if (elm_widget_focus_get(obj))
|
if (elm_widget_focus_get(obj))
|
||||||
{
|
{
|
||||||
elm_object_focus_set(sd->entry, EINA_FALSE);
|
elm_object_focus_set(sd->entry, EINA_FALSE);
|
||||||
|
|
Loading…
Reference in New Issue