yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=c15d11abf1b3880be52304ae44f62d6de45ebb1b

commit c15d11abf1b3880be52304ae44f62d6de45ebb1b
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Wed Nov 25 14:13:05 2015 +0200

    Refactoring/renaming variables
---
 src/bin/gui/editor.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index f2e4b8e..4dd3d87 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -66,7 +66,8 @@ typedef struct
         /* Layout packing data. */
         struct
           {
-             Eid *drop_to_item;
+             Eid *drop_instead_obj;
+             Object_Container_Item *drop_obj_item;
              const char *part;
              Evas_Coord ox, ow, oy, oh;
           };
@@ -1810,9 +1811,9 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
      }
    else if (drop_to_wdg == DROP_TO_LAYOUT)
      {
-        if (di->drop_to_item)
+        if (di->drop_instead_obj)
           {
-             Object_Container_Item *cit = 
wdg_obj_container_item_get(drop_target_wdg, -1, eid_name_get(di->drop_to_item));
+             Object_Container_Item *cit = di->drop_obj_item;
              if (cit)
                {
                   Object_Container *_old_container, *_new_container;
@@ -1836,11 +1837,11 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
                   Object_Container_Item *ci = obj_container_item_new(new_prop, 
wdg_eid_get(new_wdg));
 
                   /* Get index of old item. */
-                  int idx = wdg_obj_container_item_idx_get(drop_target_wdg, 
di->drop_to_item, EINA_FALSE);
+                  int idx = wdg_obj_container_item_idx_get(drop_target_wdg, 
di->drop_instead_obj, EINA_FALSE);
                   wdg_obj_container_item_remove(drop_target_wdg, cit);
                   wdg_obj_container_item_add(drop_target_wdg, ci, idx);
-                  if (eid_is_dummy(di->drop_to_item))
-                    memento_command_add(di->drop_to_item, MEMENTO_WIDGET,  
(void *) (intptr_t) EINA_TRUE, (void *) (intptr_t) EINA_FALSE);
+                  if (eid_is_dummy(di->drop_instead_obj))
+                    memento_command_add(di->drop_instead_obj, MEMENTO_WIDGET,  
(void *) (intptr_t) EINA_TRUE, (void *) (intptr_t) EINA_FALSE);
                }
           }
         else
@@ -2396,9 +2397,10 @@ _drop_target_pos(void *data, Eo *obj, Evas_Coord x, 
Evas_Coord y, Elm_Xdnd_Actio
           }
 
         /* If previously found object changed. */
-        if (di->drop_to_item != ieid)
+        if (di->drop_instead_obj != ieid)
           {
-             di->drop_to_item = ieid;
+             di->drop_instead_obj = ieid;
+             di->drop_obj_item = cit;
              repack = EINA_TRUE;
              di->ox = ox;
              di->oy = oy;
@@ -2421,7 +2423,7 @@ _drop_target_pos(void *data, Eo *obj, Evas_Coord x, 
Evas_Coord y, Elm_Xdnd_Actio
                   Gui_Widget_Property *i_prop = 
obj_container_item_prop_get(cit);
                   part = STRING_GET(prop_value_nth_get(i_prop, 0));
                   eo_do(o_container, elm_obj_container_content_unset(part));
-                  if (ieid == di->drop_to_item)
+                  if (ieid == di->drop_instead_obj)
                     {
                        eo_do(ieo, efl_gfx_visible_set(EINA_FALSE));
                        eo_do(o_container, elm_obj_container_content_set(part, 
di->eo_cur));

-- 


Reply via email to