summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-02-07 12:42:00 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-02-07 12:42:00 +0100
commit4f9abba44049561d31e81ccdfddb4b9c3feae017 (patch)
tree7f8c8ad2ae5deef441c796458376ca348aa785a1 /src
parentcd816eec01834904422e02296e04e799f475b7c4 (diff)
efl_ui_text: emit EFL_UI_TEXT_EVENT_CHANGED_USER from paste + drop operations
Summary: this is a user-triggered change so it must emit the event ref T6979 Depends on D7886 Reviewers: bu5hm4n, cedric, segfaultxavi Subscribers: #reviewers, #committers Tags: #efl_widgets Maniphest Tasks: T6979 Differential Revision: https://phab.enlightenment.org/D7887
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_text.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c
index d30c721..806c2b4 100644
--- a/src/lib/elementary/efl_ui_text.c
+++ b/src/lib/elementary/efl_ui_text.c
@@ -599,8 +599,10 @@ _selection_data_cb(void *data EINA_UNUSED, Eo *obj,
599 Efl_Ui_Selection_Data *sel_data) 599 Efl_Ui_Selection_Data *sel_data)
600{ 600{
601 Efl_Text_Cursor_Cursor *cur, *start, *end; 601 Efl_Text_Cursor_Cursor *cur, *start, *end;
602 Efl_Ui_Text_Change_Info info = { NULL, 0, 0, 0, 0 };
602 603
603 char *buf = eina_slice_strdup(sel_data->content); 604 char *buf = eina_slice_strdup(sel_data->content);
605 size_t len = sel_data->content.len;
604 606
605 efl_text_interactive_selection_cursors_get(obj, &start, &end); 607 efl_text_interactive_selection_cursors_get(obj, &start, &end);
606 if (!efl_text_cursor_equal(obj, start, end)) 608 if (!efl_text_cursor_equal(obj, start, end))
@@ -608,6 +610,10 @@ _selection_data_cb(void *data EINA_UNUSED, Eo *obj,
608 efl_canvas_text_range_delete(obj, start, end); 610 efl_canvas_text_range_delete(obj, start, end);
609 } 611 }
610 cur = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN); 612 cur = efl_text_cursor_get(obj, EFL_TEXT_CURSOR_GET_MAIN);
613 info.insert = EINA_TRUE;
614 info.position = efl_text_cursor_position_get(obj, cur);
615 info.length = len;
616 info.content = buf;
611 if (sel_data->format == EFL_UI_SELECTION_FORMAT_MARKUP) 617 if (sel_data->format == EFL_UI_SELECTION_FORMAT_MARKUP)
612 { 618 {
613 efl_text_markup_interactive_cursor_markup_insert(obj, cur, buf); 619 efl_text_markup_interactive_cursor_markup_insert(obj, cur, buf);
@@ -616,6 +622,7 @@ _selection_data_cb(void *data EINA_UNUSED, Eo *obj,
616 { 622 {
617 efl_text_cursor_text_insert(obj, cur, buf); 623 efl_text_cursor_text_insert(obj, cur, buf);
618 } 624 }
625 efl_event_callback_call(obj, EFL_UI_TEXT_EVENT_CHANGED_USER, &info);
619 free(buf); 626 free(buf);
620} 627}
621 628