jypark pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=9a3c486db4a671be25b4b596f054bd0fc3238d0b

commit 9a3c486db4a671be25b4b596f054bd0fc3238d0b
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Tue Mar 22 19:47:48 2016 +0830

    elm_entry: revert drag_target_set API in elm_entry.
    
    elm_entry, editable value is used not only drag_target but also other 
editable feature
---
 src/lib/elm_entry.c        | 17 ++---------------
 src/lib/elm_entry.eo       | 27 +++++++++++++++++++++++----
 src/lib/elm_entry_legacy.h | 29 -----------------------------
 3 files changed, 25 insertions(+), 48 deletions(-)

diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index 81676b2..42279fa 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -4107,7 +4107,7 @@ _elm_entry_line_wrap_get(Eo *obj EINA_UNUSED, 
Elm_Entry_Data *sd)
 }
 
 EOLIAN static void
-_elm_entry_evas_draggable_interface_drag_target_set(Eo *obj, Elm_Entry_Data 
*sd, Eina_Bool editable)
+_elm_entry_editable_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool editable)
 {
    if (sd->editable == editable) return;
    sd->editable = editable;
@@ -4130,7 +4130,7 @@ _elm_entry_evas_draggable_interface_drag_target_set(Eo 
*obj, Elm_Entry_Data *sd,
 }
 
 EOLIAN static Eina_Bool
-_elm_entry_evas_draggable_interface_drag_target_get(Eo *obj EINA_UNUSED, 
Elm_Entry_Data *sd)
+_elm_entry_editable_get(Eo *obj EINA_UNUSED, Elm_Entry_Data *sd)
 {
    return sd->editable;
 }
@@ -5855,17 +5855,4 @@ _elm_entry_elm_interface_atspi_accessible_name_get(Eo 
*obj, Elm_Entry_Data *sd)
    return ret ? strdup(ret) : NULL;
 }
 
-/* Legacy deprecated functions */
-EAPI void
-elm_entry_editable_set(Evas_Object *obj, Eina_Bool edit)
-{
-   evas_draggable_interface_drag_target_set(obj, edit);
-}
-
-EAPI Eina_Bool
-elm_entry_editable_get(const Evas_Object *obj)
-{
-   return evas_draggable_interface_drag_target_get(obj);
-}
-
 #include "elm_entry.eo.c"
diff --git a/src/lib/elm_entry.eo b/src/lib/elm_entry.eo
index 71825e2..166c6c7 100644
--- a/src/lib/elm_entry.eo
+++ b/src/lib/elm_entry.eo
@@ -112,8 +112,7 @@ enum Elm.Cnp_Mode
 
 class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interface,
                  Elm.Interface_Atspi_Text, Elm.Interface_Atspi_Editable_Text, 
Efl.File,
-                 Evas.Selectable_Interface, Evas.Scrollable_Interface,
-                 Evas.Draggable_Interface)
+                 Evas.Selectable_Interface, Evas.Scrollable_Interface)
 {
    eo_prefix: elm_obj_entry;
    methods {
@@ -262,6 +261,28 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interface,
             autocapital_type: Elm.Autocapital.Type; [[The type of 
autocapitalization.]]
          }
       }
+      @property editable {
+         set {
+            [[Sets if the entry is to be editable or not.
+
+              By default, entries are editable and when focused, any text 
input by the
+              user will be inserted at the current cursor position. But 
calling this
+              function with $editable as $false will prevent the user from
+              inputting text into the entry.
+
+              The only way to change the text of a non-editable entry is to use
+              \@ref elm_object_text_set, \@ref elm_entry_entry_insert and 
other related
+              functions.
+            ]]
+         }
+         get {
+            [[Get whether the entry is editable or not.]]
+         }
+         values {
+            editable: bool; [[If $true, user input will be inserted in the 
entry,
+            if not, the entry is read-only and no user input is allowed.]]
+         }
+      }
       @property anchor_hover_style {
          set {
             [[Set the style that the hover should use
@@ -904,8 +925,6 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, 
Evas.Clickable_Interface,
       Evas.Object_Smart.del;
       Evas.Object_Smart.show;
       Evas.Object_Smart.hide;
-      Evas.Draggable_Interface.drag_target.set;
-      Evas.Draggable_Interface.drag_target.get;
       Elm.Widget.activate;
       Elm.Widget.focus_direction_manager_is;
       Elm.Widget.theme_apply;
diff --git a/src/lib/elm_entry_legacy.h b/src/lib/elm_entry_legacy.h
index 040fef5..2a30544 100644
--- a/src/lib/elm_entry_legacy.h
+++ b/src/lib/elm_entry_legacy.h
@@ -71,32 +71,3 @@ EAPI Eina_Bool          elm_entry_file_set(Evas_Object *obj, 
const char *file, E
  * @param[out] format The file format
  */
 EAPI void               elm_entry_file_get(const Evas_Object *obj, const char 
**file, Elm_Text_Format *format);
-
-/**
- * @brief Sets if the entry is to be editable or not.
- *
- * By default, entries are editable and when focused, any text input by the
- * user will be inserted at the current cursor position. But calling this
- * function with @c editable as @c false will prevent the user from inputting
- * text into the entry.
- *
- * The only way to change the text of a non-editable entry is to use @ref
- * elm_object_text_set, @ref elm_entry_entry_insert and other related
- * functions.
- *
- * @param[in] editable If @c true, user input will be inserted in the entry, if
- * not, the entry is read-only and no user input is allowed.
- *
- * @ingroup Elm_Entry
- */
-EAPI void elm_entry_editable_set(Evas_Object *obj, Eina_Bool editable);
-
-/**
- * @brief Get whether the entry is editable or not.
- *
- * @return If @c true, user input will be inserted in the entry, if not, the
- * entry is read-only and no user input is allowed.
- *
- * @ingroup Elm_Entry
- */
-EAPI Eina_Bool elm_entry_editable_get(const Evas_Object *obj);

-- 


Reply via email to