Elm entry now uses new & improved cut and paste.
authorBrett Nash <nash@nash.id.au>
Wed, 23 Jun 2010 08:08:17 +0000 (08:08 +0000)
committerBrett Nash <nash@nash.id.au>
Wed, 23 Jun 2010 08:08:17 +0000 (08:08 +0000)
SVN revision: 49813

src/lib/elm_entry.c
src/lib/elm_priv.h

index c60cb9a..cd31140 100644 (file)
@@ -451,16 +451,7 @@ _paste(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    if (wd->sel_notify_handler)
      {
 #ifdef HAVE_ELEMENTARY_X
-       Evas_Object *top;
-
-       top = elm_widget_top_get(data);
-       if ((top) && (elm_win_xwindow_get(top)))
-         {
-            ecore_x_selection_clipboard_request
-              (elm_win_xwindow_get(top),
-               ECORE_X_SELECTION_TARGET_UTF8_STRING);
-            wd->selection_asked = EINA_TRUE;
-         }
+       elm_selection_get(ELM_SEL_CLIPBOARD, ELM_SEL_MARKUP, data);
 #endif
      }
 }
@@ -471,7 +462,6 @@ _store_selection(enum _elm_sel_type seltype, Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    const char *sel;
 
-
    if (!wd) return;
    sel = edje_object_part_text_selection_get(wd->ent, "elm.text");
    elm_selection_set(seltype, obj, ELM_SEL_MARKUP, sel);
index ecfe8ab..0a4f6eb 100644 (file)
@@ -205,6 +205,7 @@ void              _elm_config_shutdown(void);
 
 Eina_Bool        elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget, enum _elm_sel_format format, const char *buf);
 Eina_Bool        elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget);
+Eina_Bool        elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format, Evas_Object *widget);