summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Alzyod <ali198724@gmail.com>2020-11-18 15:54:56 +0200
committerali-alzyod <ali198724@gmail.com>2020-11-18 15:54:57 +0200
commitac2987b3638e01866b4ff67c3a3bf95d6e373619 (patch)
treedcc09e18d118c93922934243613f4dcf8b337ed9
parent6b47edd99865dcfed6d45d8ccfc418e1b42b160e (diff)
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
-rw-r--r--src/lib/elementary/elm_entry.c12
1 files 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,
2341 if (entry != data) elm_entry_select_none(entry); 2341 if (entry != data) elm_entry_select_none(entry);
2342 } 2342 }
2343 2343
2344 Eina_Bool b_value = EINA_TRUE; 2344 evas_object_smart_callback_call(data, "selection,start", NULL);
2345 efl_event_callback_legacy_call
2346 (data, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
2347 2345
2348 elm_object_focus_set(data, EINA_TRUE); 2346 elm_object_focus_set(data, EINA_TRUE);
2349} 2347}
@@ -2411,9 +2409,7 @@ _entry_selection_cleared_signal_cb(void *data,
2411 if (!sd->have_selection) return; 2409 if (!sd->have_selection) return;
2412 2410
2413 sd->have_selection = EINA_FALSE; 2411 sd->have_selection = EINA_FALSE;
2414 Eina_Bool b_value = sd->have_selection; 2412 evas_object_smart_callback_call(data, "selection,cleared", NULL);
2415 efl_event_callback_legacy_call
2416 (data, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
2417 // XXX: still try primary selection even if on wl in case it's 2413 // XXX: still try primary selection even if on wl in case it's
2418 // supported 2414 // supported
2419// if (!_entry_win_is_wl(data)) 2415// if (!_entry_win_is_wl(data))
@@ -4450,9 +4446,7 @@ _elm_entry_select_none(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
4450 } 4446 }
4451 if (sd->have_selection) 4447 if (sd->have_selection)
4452 { 4448 {
4453 Eina_Bool b_value = sd->have_selection; 4449 evas_object_smart_callback_call(obj, "selection,cleared", NULL);
4454 efl_event_callback_legacy_call
4455 (obj, EFL_TEXT_INTERACTIVE_EVENT_HAVE_SELECTION_CHANGED, &b_value);
4456 } 4450 }
4457 4451
4458 sd->have_selection = EINA_FALSE; 4452 sd->have_selection = EINA_FALSE;