summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-07-15 21:29:33 +0100
committerAndy Williams <andy@andywilliams.me>2017-07-15 21:29:48 +0100
commit665679bc423ee81cf97fe26b30560bb611e9deba (patch)
tree856e9e91fe0870db9ba0a399a1aac597f7000fa7
parentf5449dafd320838e788667b4c71441caa919946b (diff)
downloadefl-665679bc423ee81cf97fe26b30560bb611e9deba.tar.gz
elm_code: add missing selection signals
-rw-r--r--src/lib/elementary/elm_code_widget.eo3
-rw-r--r--src/lib/elementary/elm_code_widget_selection.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget.eo b/src/lib/elementary/elm_code_widget.eo
index 6cc219fd07..c61277b4ac 100644
--- a/src/lib/elementary/elm_code_widget.eo
+++ b/src/lib/elementary/elm_code_widget.eo
@@ -315,5 +315,8 @@ class Elm.Code_Widget (Elm.Layout, Elm.Interface.Atspi.Text)
selection,start; [[Called when a selection is started]]
selection,changed; [[Called when selection changed]]
selection,cleared; [[Called when selection was cleared]]
+ selection,cut; [[Called when a cut action is performed]]
+ selection,copy; [[Called when a copy action is performed]]
+ selection,paste; [[Called when a paste action is performed]]
}
}
diff --git a/src/lib/elementary/elm_code_widget_selection.c b/src/lib/elementary/elm_code_widget_selection.c
index 5c5c1b7dbc..a510cde5bf 100644
--- a/src/lib/elementary/elm_code_widget_selection.c
+++ b/src/lib/elementary/elm_code_widget_selection.c
@@ -399,6 +399,7 @@ elm_code_widget_selection_cut(Evas_Object *widget)
elm_code_widget_selection_delete(widget);
+ efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_CUT, widget);
efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_CHANGED_USER, NULL);
}
@@ -414,6 +415,8 @@ elm_code_widget_selection_copy(Evas_Object *widget)
elm_cnp_selection_set(widget, ELM_SEL_TYPE_CLIPBOARD, ELM_SEL_FORMAT_TEXT, text, strlen(text));
elm_cnp_selection_loss_callback_set(widget, ELM_SEL_TYPE_CLIPBOARD, _selection_loss_cb, widget);
free(text);
+
+ efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_COPY, widget);
}
static Eina_Bool
@@ -424,6 +427,8 @@ _selection_paste_cb(void *data, Evas_Object *obj EINA_UNUSED, Elm_Selection_Data
widget = (Elm_Code_Widget *)data;
elm_code_widget_text_at_cursor_insert(widget, ev->data);
+
+ efl_event_callback_legacy_call(widget, ELM_OBJ_CODE_WIDGET_EVENT_SELECTION_PASTE, widget);
return EINA_TRUE;
}