cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=19dcea07d1248762c1abe2f026f97f597e436530

commit 19dcea07d1248762c1abe2f026f97f597e436530
Author: Woochan Lee <[email protected]>
Date:   Tue Nov 1 10:51:27 2016 -0700

    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 <[email protected]>
---
 src/lib/elementary/elc_multibuttonentry.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/lib/elementary/elc_multibuttonentry.c 
b/src/lib/elementary/elc_multibuttonentry.c
index 45773ab..fb76690 100644
--- a/src/lib/elementary/elc_multibuttonentry.c
+++ b/src/lib/elementary/elc_multibuttonentry.c
@@ -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"))))

-- 


Reply via email to