cedric pushed a commit to branch master.

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

commit b63cdb64971391f324d6624d1d323383a2efb905
Author: Jeonghyun Yun <jh0506....@samsung.com>
Date:   Tue Mar 6 17:54:57 2018 -0800

    elementary: entry - fix to generate "activated" and "aborted" event in 
single line entry only
    
    Summary:
    "aborted": The escape key was pressed on a single line entry. (since 1.7)
    "activated": The enter key was pressed on a single line entry.
    
    Reviewers: id213sin, jpeg, cedric, herdsman
    
    Subscribers: cedric, jpeg
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D5728
    
    Signed-off-by: Cedric Bail <ced...@osg.samsung.com>
---
 src/lib/elementary/elm_entry.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index eff0bbfa65..4cd96d47e6 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -2720,7 +2720,10 @@ _entry_key_enter_signal_cb(void *data,
                            const char *emission EINA_UNUSED,
                            const char *source EINA_UNUSED)
 {
-   efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_ACTIVATED, NULL);
+   ELM_ENTRY_DATA_GET(data, sd);
+
+   if (sd->single_line)
+     efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_ACTIVATED, NULL);
 }
 
 static void
@@ -2729,7 +2732,10 @@ _entry_key_escape_signal_cb(void *data,
                             const char *emission EINA_UNUSED,
                             const char *source EINA_UNUSED)
 {
-   efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_ABORTED, NULL);
+   ELM_ENTRY_DATA_GET(data, sd);
+
+   if (sd->single_line)
+     efl_event_callback_legacy_call(data, ELM_ENTRY_EVENT_ABORTED, NULL);
 }
 
 static void

-- 


Reply via email to