[src/lib/Elementary.h.in] Corrected some description errors in tickernoti's APIs.
[framework/uifw/elementary.git] / src / modules / popup_copypasteUI / copypaste.c
index 9abb8e3..381f711 100644 (file)
@@ -54,16 +54,18 @@ _cancel(void *data, Evas_Object *obj, void *event_info)
 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);
-        if (ext_mod->textonly)
-               elm_cbhm_send_raw_data("show0");
-       else
-               elm_cbhm_send_raw_data("show1");
-       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
@@ -112,11 +114,11 @@ obj_unhook(Evas_Object *obj)
 
 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*/
@@ -136,7 +138,7 @@ obj_longpress(Evas_Object *obj)
                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
@@ -162,7 +164,7 @@ obj_longpress(Evas_Object *obj)
                                                }
                                        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
                                                                {
@@ -184,11 +186,10 @@ obj_longpress(Evas_Object *obj)
                {
                        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
@@ -196,12 +197,5 @@ obj_mouseup(Evas_Object *obj)
 {
 /*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);
-                       }
-     }     
 }