From: Ali Alzyod Date: Tue, 8 Sep 2020 06:55:30 +0000 (+0900) Subject: elm_entry: legacy smart selection[start,cleared] callback fix X-Git-Tag: submit/tizen/20200911.065559~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F62%2F243562%2F1;p=platform%2Fupstream%2Fefl.git 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 Change-Id: Ib23e07470d3ff28caecc700d26047c3245d28f8a --- diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index b74be3b..e457d14 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -3250,9 +3250,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); } @@ -3355,9 +3353,7 @@ _entry_selection_cleared_signal_cb(void *data, *******/ 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 //TIZEN_ONLY(20180817): primary selection is not supported yet @@ -6064,9 +6060,7 @@ _elm_entry_select_none(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd) * obj_hidemenu() is getting called from _entry_selection_cleared_signal_cb() 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;