_share(void *data, Evas_Object *obj, void *event_info)
{
char *str = NULL;
+#ifdef HAVE_ELEMENTARY_X
Ecore_X_Atom atom;
-
+#endif
str = elm_entry_markup_to_utf8(elm_entry_selection_get(data));
if (!str) return;
-
+#ifdef HAVE_ELEMENTARY_X
atom = ecore_x_atom_get("_TEXT_SHARE_TEST");
if (atom)
{
ecore_x_window_prop_string_set(ecore_x_window_root_first_get(), atom, str);
- ecore_x_client_message32_send(ecore_x_window_root_first_get(),
+ ecore_x_client_message32_send(ecore_x_window_root_first_get(),
atom, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
0, 0, 0, 0, 0);
}
+#endif
free(str);
evas_object_hide(obj);
_clipboard_menu(void *data, Evas_Object *obj, void *event_info)
{
// start for cbhm
+#ifdef HAVE_ELEMENTARY_X
ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1);
+#endif
ext_mod->cnpinit(data,obj,event_info);
elm_cbhm_helper_init(obj);
- if (ext_mod->textonly)
+ if (ext_mod->cnp_mode != ELM_CNP_MODE_MARKUP)
elm_cbhm_send_raw_data("show0");
else
elm_cbhm_send_raw_data("show1");
EAPI void
obj_longpress(Evas_Object *obj)
-{
+{
if(!ext_mod) return;
Evas_Object *top;
const Eina_List *l;
elm_widget_sub_object_add(obj, ext_mod->popup);
if (!ext_mod->selmode)
- {
+ {
if (!ext_mod->password)
{
if (!elm_entry_is_empty(obj))
{
elm_ctxpopup_item_append(ext_mod->popup, "Copy", NULL, _copy, obj );
if (ext_mod->editable)
- elm_ctxpopup_item_append(ext_mod->popup, "Cut", NULL, _cut, obj );
+ elm_ctxpopup_item_append(ext_mod->popup, "Cut", NULL, _cut, obj );
if (ext_mod->editable)
elm_ctxpopup_item_append(ext_mod->popup, "Paste", NULL, _paste, obj );
icon = elm_icon_add(ext_mod->popup);
}
else
{
- _cancel(obj,ext_mod->popup,NULL);
+ _cancel(obj,ext_mod->popup,NULL);
if (!elm_entry_is_empty(obj))
{
elm_ctxpopup_item_append(ext_mod->popup, "Select", NULL, _select, obj );
{
elm_object_scroll_freeze_push(ext_mod->popup);
_ctxpopup_position(obj);
- evas_object_show(ext_mod->popup);
+ evas_object_show(ext_mod->popup);
}
}
- ext_mod->longpress_timer = NULL;
}
EAPI void
/*update*/
elm_entry_extension_module_data_get(obj,ext_mod);
- if (ext_mod->longpress_timer)
- {
- if (ext_mod->have_selection )
- {
- _cancel(obj,ext_mod->popup,NULL);
- }
- }
}