ali-alzyod pushed a commit to branch master.

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

commit ac2987b3638e01866b4ff67c3a3bf95d6e373619
Author: Ali Alzyod <[email protected]>
Date:   Wed Nov 18 15:54:56 2020 +0200

    elm_entry: legacy smart selection[start,cleared] callback fix
    
    Summary:
    due to changes in latest text apis in unified, legacy selection call back 
[start,clear] does not work anymore,
    Now add the support for legacy callback [selection,start   
selection,cleared]
    
    Reviewers: woohyun, bowonryu, stefan_schmidt
    
    Reviewed By: bowonryu
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D12126
---
 src/lib/elementary/elm_entry.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 307976976c..6a82bff2e1 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -2341,9 +2341,7 @@ _entry_selection_start_signal_cb(void *data,
         if (entry != data) elm_entry_select_none(entry);
      }
 
-   Eina_Bool b_value = EINA_TRUE;
-   efl_event_callback_legacy_call
-     (data, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
+   evas_object_smart_callback_call(data, "selection,start", NULL);
 
    elm_object_focus_set(data, EINA_TRUE);
 }
@@ -2411,9 +2409,7 @@ _entry_selection_cleared_signal_cb(void *data,
    if (!sd->have_selection) return;
 
    sd->have_selection = EINA_FALSE;
-   Eina_Bool b_value = sd->have_selection;
-   efl_event_callback_legacy_call
-     (data, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
+   evas_object_smart_callback_call(data, "selection,cleared", NULL);
    // XXX: still try primary selection even if on wl in case it's
    // supported
 //   if (!_entry_win_is_wl(data))
@@ -4450,9 +4446,7 @@ _elm_entry_select_none(Eo *obj EINA_UNUSED, 
Elm_Entry_Data *sd)
      }
    if (sd->have_selection)
      {
-        Eina_Bool b_value = sd->have_selection;
-        efl_event_callback_legacy_call
-       (obj, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
+       evas_object_smart_callback_call(obj, "selection,cleared", NULL);
      }
 
    sd->have_selection = EINA_FALSE;

-- 


Reply via email to