tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=438e1db893c0226c7f8fd2998f5ee2f3d261b712

commit 438e1db893c0226c7f8fd2998f5ee2f3d261b712
Author: Tom Hacohen <t...@stosb.com>
Date:   Tue Mar 1 14:47:40 2016 +0000

    Manually semi-migrate files in preparation for the script
    
    The migration scripts breaks with some weird cases, here I manually
    migrated some parts, and just removed the eo_do from others without
    actually migrating (so I could deal with that later).
---
 src/examples/evas/evas-3d-frustum.c    |  4 +-
 src/lib/edje/edje_calc.c               | 28 ++++++-------
 src/lib/edje/edje_text.c               | 75 ++++++++++++++--------------------
 src/lib/evas/canvas/evas_object_main.c |  2 +-
 src/tests/eo/suite/eo_test_general.c   |  2 +-
 5 files changed, 49 insertions(+), 62 deletions(-)

diff --git a/src/examples/evas/evas-3d-frustum.c 
b/src/examples/evas/evas-3d-frustum.c
index 465160b..94d43f2 100644
--- a/src/examples/evas/evas-3d-frustum.c
+++ b/src/examples/evas/evas-3d-frustum.c
@@ -314,8 +314,8 @@ _light_setup(Scene_Data *data)
 {
    data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
    eo_do(data->light,
-         evas_canvas3d_light_ambient_set( 0.2, 0.2, 0.2, 1.0);
-         evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0);
+         evas_canvas3d_light_ambient_set( 0.2, 0.2, 0.2, 1.0),
+         evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
          evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
 
    data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS,evas,
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 55fb82f..28a346b 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2596,10 +2596,10 @@ _edje_part_recalc_single_filter(Edje *ed,
           {
              Edje_Part_Description_Spec_Filter_Data *data = &(filter->data[k]);
              if (data->invalid_cc)
-               continue;
+                continue;
              if (!data->value)
                {
-                  eo_do(obj, efl_gfx_filter_data_set(data->name, NULL, 
EINA_FALSE));
+                  efl_gfx_filter_data_set(data->name, NULL, EINA_FALSE);
                }
              else if (!strncmp(data->value, "color_class('", 
sizeof("color_class('") - 1))
                {
@@ -2629,7 +2629,7 @@ _edje_part_recalc_single_filter(Edje *ed,
                                           (int) cc->r2, (int) cc->g2, (int) 
cc->b2, (int) cc->a2,
                                           (int) cc->r3, (int) cc->g3, (int) 
cc->b3, (int) cc->a3);
                                  buffer[len - 1] = 0;
-                                 eo_do(obj, 
efl_gfx_filter_data_set(data->name, buffer, EINA_TRUE));
+                                 efl_gfx_filter_data_set(data->name, buffer, 
EINA_TRUE);
                               }
                             else
                               {
@@ -2646,14 +2646,14 @@ _edje_part_recalc_single_filter(Edje *ed,
                     }
                }
              else
-                eo_do(obj, efl_gfx_filter_data_set(data->name, data->value, 
EINA_FALSE));
+                efl_gfx_filter_data_set(data->name, data->value, EINA_FALSE);
           }
      }
-   eo_do(obj, efl_gfx_filter_program_set(code, filter->name));
+   efl_gfx_filter_program_set(code, filter->name);
    if (prev_sources != filter_sources)
      {
         /* remove sources that are not there anymore
-               * this O(n^2) loop assumes a very small number of sources */
+         * this O(n^2) loop assumes a very small number of sources */
         EINA_LIST_FOREACH(prev_sources, li1, src1)
           {
              Eina_Bool found = 0;
@@ -2669,12 +2669,12 @@ _edje_part_recalc_single_filter(Edje *ed,
                {
                   part = strchr(src1, ':');
                   if (!part)
-                    eo_do(obj, efl_gfx_filter_source_set(src1, NULL));
+                     efl_gfx_filter_source_set(src1, NULL);
                   else
                     {
                        char *name = strdup(src1);
                        name[part - src1] = 0;
-                       eo_do(obj, efl_gfx_filter_source_set(name, NULL));
+                       efl_gfx_filter_source_set(obj, name, NULL);
                        free(name);
                     }
                }
@@ -2693,21 +2693,21 @@ _edje_part_recalc_single_filter(Edje *ed,
              else
                 part = src1;
              rp = _edje_real_part_get(ed, part);
-             eo_do(obj, efl_gfx_filter_source_set(name ? name : part, rp ? 
rp->object : NULL));
+             efl_gfx_filter_source_set(name ? name : part, rp ? rp->object : 
NULL);
              free(name);
           }
      }
    /* pass edje state for transitions */
    if (ep->param2)
      {
-        eo_do(obj, efl_gfx_filter_state_set(chosen_desc->state.name, 
chosen_desc->state.value,
-                                            
ep->param2->description->state.name, ep->param2->description->state.value,
-                                            pos));
+        efl_gfx_filter_state_set(chosen_desc->state.name, 
chosen_desc->state.value,
+              ep->param2->description->state.name, 
ep->param2->description->state.value,
+              pos);
      }
    else
      {
-        eo_do(obj, efl_gfx_filter_state_set(chosen_desc->state.name, 
chosen_desc->state.value,
-                                            NULL, 0.0, pos));
+        efl_gfx_filter_state_set(chosen_desc->state.name, 
chosen_desc->state.value,
+              NULL, 0.0, pos);
      }
 }
 
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index a49b661..371675e 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -321,15 +321,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
    ep->typedata.text->cache.in_size = size;
    if (chosen_desc->text.fit_x && (ep->typedata.text->cache.in_str && 
eina_stringshare_strlen(ep->typedata.text->cache.in_str) > 0))
      {
-        eo_do(ep->object,
-
-              if (inlined_font) efl_text_properties_font_source_set(ed->path);
-              else efl_text_properties_font_source_set(NULL);
+        if (inlined_font) efl_text_properties_font_source_set(ed->path);
+        else efl_text_properties_font_source_set(NULL);
 
-              if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
+        if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
 
-              efl_text_properties_font_set(font, size);
-              efl_text_set(text));
+        efl_text_properties_font_set(font, size);
+        efl_text_set(text);
 
         part_get_geometry(ep, &tw, &th);
         /* Find the wanted font size */
@@ -337,14 +335,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
           {
              size = (size * sw) / tw;
 
-             eo_do(ep->object,
+             if (inlined_font) efl_text_properties_font_source_set(ed->path);
+             else efl_text_properties_font_source_set(NULL);
 
-                   if (inlined_font) 
efl_text_properties_font_source_set(ed->path);
-                   else efl_text_properties_font_source_set(NULL);
+             if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
 
-                   if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
-
-                   efl_text_properties_font_set(font, size));
+             efl_text_properties_font_set(font, size);
 
              part_get_geometry(ep, &tw, &th);
           }
@@ -361,15 +357,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
          */
         if (!chosen_desc->text.fit_x) size = sh;
 
-        eo_do(ep->object,
+           if (inlined_font) efl_text_properties_font_source_set(ed->path);
+           else efl_text_properties_font_source_set(NULL);
 
-              if (inlined_font) efl_text_properties_font_source_set(ed->path);
-              else efl_text_properties_font_source_set(NULL);
+           if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
 
-              if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
-
-              efl_text_properties_font_set(font, size);
-              efl_text_set(text));
+           efl_text_properties_font_set(font, size);
+           efl_text_set(text);
         part_get_geometry(ep, &tw, &th);
 
         /* only grow the font size if we didn't already reach the max size
@@ -386,13 +380,11 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
                   size += dif;
                   if (size <= 0) break;
 
-                  eo_do(ep->object,
-
-                        if (inlined_font) 
efl_text_properties_font_source_set(ed->path);
-                        else efl_text_properties_font_source_set(NULL);
+                  if (inlined_font) 
efl_text_properties_font_source_set(ed->path);
+                  else efl_text_properties_font_source_set(NULL);
 
-                        if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
-                        efl_text_properties_font_set(font, size));
+                  if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
+                  efl_text_properties_font_set(font, size);
 
                   part_get_geometry(ep, &tw, &th);
                   if ((size > 0) && (th == 0)) break;
@@ -403,9 +395,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
           {
              int current;
 
-             eo_do(ep->object,
-                   if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
-                   efl_text_properties_font_set(font, 10));
+             if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
+             efl_text_properties_font_set(font, 10);
 
              part_get_geometry(ep, &tw, &th);
 
@@ -426,9 +417,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
                     {
                        current = (top + bottom) / 2;
 
-                       eo_do(ep->object,
-                             if (ep->part->scale) 
evas_obj_scale_set(TO_DOUBLE(sc));
-                             efl_text_properties_font_set(font, current));
+                       if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
+                       efl_text_properties_font_set(font, current);
 
                        part_get_geometry(ep, &tw, &th);
 
@@ -443,9 +433,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
                {
                   current++;
 
-                  eo_do(ep->object,
-                        if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
-                        efl_text_properties_font_set(font, current));
+                  if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
+                  efl_text_properties_font_set(font, current);
 
                   part_get_geometry(ep, &tw, &th);
                } while (th <= sh);
@@ -465,9 +454,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
    /* Handle ellipsis */
    if (!chosen_desc->text.min_x)
      {
-        eo_do (ep->object,
-               if (inlined_font) efl_text_properties_font_source_set(ed->path);
-               else efl_text_properties_font_source_set(NULL));
+        if (inlined_font) efl_text_properties_font_source_set(ed->path);
+        else efl_text_properties_font_source_set(NULL);
 
         text = _edje_text_fit_x(ed, ep, params, chosen_desc,
                                 text, font, size,
@@ -508,14 +496,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
    ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y;
 arrange_text:
 
-   eo_do(ep->object,
-         if (inlined_font) efl_text_properties_font_source_set(ed->path);
-         else efl_text_properties_font_source_set(NULL);
+   if (inlined_font) efl_text_properties_font_source_set(ed->path);
+   else efl_text_properties_font_source_set(NULL);
 
-         if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
+   if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
 
-         efl_text_properties_font_set(font, size);
-         efl_text_set(text));
+   efl_text_properties_font_set(font, size);
+   efl_text_set(text);
    part_get_geometry(ep, &tw, &th);
 
    /* Handle alignment */
diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index f0a149c..9d90cf5 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -871,7 +871,7 @@ _evas_object_efl_gfx_base_position_set(Eo *eo_obj, 
Evas_Object_Protected_Data *o
    if ((obj->cur->geometry.x == x) && (obj->cur->geometry.y == y)) return;
 
    Evas_Map *map;
-   eo_do(eo_obj, map = (Evas_Map *) evas_obj_map_get());
+   map = (Evas_Map *) evas_obj_map_get(eo_obj);
    if (map && map->move_sync.enabled)
      {
         Evas_Coord diff_x = x - obj->cur->geometry.x;
diff --git a/src/tests/eo/suite/eo_test_general.c 
b/src/tests/eo/suite/eo_test_general.c
index 6c85b31..5add8d3 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -655,7 +655,7 @@ START_TEST(eo_magic_checks)
         fail_if(eo_class_name_get((Eo_Class*) buf));
         fail_if(eo_class_get(obj) != SIMPLE_CLASS);
         fail_if(eo_class_get(SIMPLE_CLASS) != EO_ABSTRACT_CLASS_CLASS);
-        eo_do((Eo_Class *) buf,(void) NULL);
+        eo_do((Eo_Class *) buf, simple_a_set(1));
         eo_do_super((Eo_Class *) buf, SIMPLE_CLASS, simple_a_set(++i));
         eo_do_super(SIMPLE_CLASS, (Eo_Class *) buf, simple_a_set(++i));
         fail_if(eo_class_new(NULL, (Eo_Class *) buf), NULL);

-- 


Reply via email to