elm_multibuttonentry: send "clicked" signal when item got hardware enter key.

Summary:
It was kind of bug state before.

There was no any action when the user gives a focus on an item. then press the enter key.
The item should be set as selected state after that should call clicked signal.

@fix

Test Plan: elementary test MBE sample.

Reviewers: woohyun, bu5hm4n, Hermet

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4368

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Woochan Lee 2016-11-01 10:51:27 -07:00 committed by Cedric BAIL
parent c2630c829f
commit 19dcea07d1
1 changed files with 8 additions and 0 deletions

View File

@ -1128,6 +1128,14 @@ _layout_key_down_cb(void *data,
elm_object_focus_set(sd->entry, EINA_TRUE);
}
}
else if (sd->selected_it &&
((!strcmp(ev->key, "KP_Enter")) ||
(!strcmp(ev->key, "Return"))))
{
Elm_Multibuttonentry_Item_Data *item = sd->selected_it;
if (item)
_on_item_clicked(EO_OBJ(item), NULL, NULL, NULL);
}
else if (((!sd->selected_it && (sd->n_str == 0) &&
(!strcmp(ev->key, "BackSpace"))) ||
(!strcmp(ev->key, "Delete"))))