static void
_clipboard_menu(void *data, Evas_Object *obj, void *event_info)
{
- // start for cbhm
- ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1);
- ext_mod->cnpinit(data,obj,event_info);
- elm_cbhm_helper_init(obj);
- elm_cbhm_send_raw_data("show");
- evas_object_hide(ext_mod->popup);
- // end for cbhm
+ // 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->cnp_mode != ELM_CNP_MODE_MARKUP)
+ elm_cbhm_send_raw_data("show0");
+ else
+ elm_cbhm_send_raw_data("show1");
+ evas_object_hide(ext_mod->popup);
+ // end for cbhm
}
static void
EAPI void
obj_longpress(Evas_Object *obj)
-{
+{
if(!ext_mod) return;
Evas_Object *top;
Evas_Object *list;
-
+
const Eina_List *l;
const Elm_Entry_Context_Menu_Item *it;
/*update*/
elm_list_mode_set(list, ELM_LIST_COMPRESS);
elm_widget_sub_object_add(obj, ext_mod->popup);
if (!ext_mod->selmode)
- {
+ {
if (!ext_mod->password)
elm_list_item_append(list, "Select", NULL, NULL,_select, obj);
if (1) // need way to detect if someone has a selection
}
// elm_ctxpopup_item_add(wd->ctxpopup, NULL, "Selectall",_select_all, obj );
// start for cbhm
- if (!ext_mod->password)
+ if ((!ext_mod->password) && (ext_mod->editable))
elm_list_item_append(list, "More", NULL, NULL,_clipboard_menu, obj);
// end for cbhm
}
}
else
{
- _cancel(obj,ext_mod->popup,NULL);
+ _cancel(obj,ext_mod->popup,NULL);
elm_list_item_append(list, "Select", NULL, NULL,_select, obj);
if (1) // need way to detect if someone has a selection
{
}
}
// start for cbhm
- elm_list_item_append(list, "More", NULL, NULL,_clipboard_menu, obj);
+ if (ext_mod->editable)
+ elm_list_item_append(list, "More", NULL, NULL,_clipboard_menu, obj);
// end for cbhm
}
}
{
elm_list_go(list);
elm_popup_content_set(ext_mod->popup, list);
- evas_object_show(ext_mod->popup);
+ evas_object_show(ext_mod->popup);
evas_render( evas_object_evas_get( 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);
- }
- }
}