static Eina_Bool _x11_is_uri_type_data (X11_Cnp_Selection *sel EINA_UNUSED, Ecore_X_Event_Selection_Notify *notify);
static Eina_Bool _x11_notify_handler_targets (X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify);
static Eina_Bool _x11_data_preparer_text (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
+static Eina_Bool _x11_data_preparer_markup (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
static Eina_Bool _x11_data_preparer_image (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
static Eina_Bool _x11_data_preparer_uri (Ecore_X_Event_Selection_Notify *notify, Elm_Selection_Data *ddata, Tmp_Info **tmp_info);
//static int _x11_notify_handler_html (X11_Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify);
.formats = ELM_SEL_FORMAT_MARKUP,
#ifdef HAVE_ELEMENTARY_X
.x_converter = _x11_general_converter,
+ .x_data_preparer = _x11_data_preparer_markup,
#endif
},
ARRAYINIT(CNP_ATOM_text_urilist) {
return EINA_TRUE;
}
+static Eina_Bool
+_x11_data_preparer_markup(Ecore_X_Event_Selection_Notify *notify,
+ Elm_Selection_Data *ddata, Tmp_Info **tmp_info EINA_UNUSED)
+{
+ Ecore_X_Selection_Data *data = notify->data;
+ ddata->format = ELM_SEL_FORMAT_MARKUP;
+ ddata->data = eina_memdup(data->data, data->length, EINA_TRUE);
+ ddata->len = data->length;
+ return EINA_TRUE;
+}
+
/**
* So someone is pasting an image into my entry or widget...
*/
snprintf(entry_tag, len + 1, tag_string, buf);
_edje_entry_user_insert(obj, entry_tag);
}
+ else if (sel_data->format & ELM_SEL_FORMAT_MARKUP)
+ {
+ _edje_entry_user_insert(obj, buf);
+ }
else
{
char *txt = _elm_util_text_to_mkup(buf);