rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=197cc0189482eaa3400dbce8dcef7ee7a060d074

commit 197cc0189482eaa3400dbce8dcef7ee7a060d074
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Tue Dec 1 16:19:57 2015 +0200

    groupedit: delete unnecessary member 'real_size' and used macro
    
    Change-Id: I1dc7e83921bb65a040d46722b1243eb303b9a67a
---
 src/bin/ui/workspace/groupedit.c         |  2 --
 src/bin/ui/workspace/groupedit_calc.c    | 55 --------------------------------
 src/bin/ui/workspace/groupedit_private.h |  1 -
 3 files changed, 58 deletions(-)

diff --git a/src/bin/ui/workspace/groupedit.c b/src/bin/ui/workspace/groupedit.c
index 0da59c2..8932d4c 100644
--- a/src/bin/ui/workspace/groupedit.c
+++ b/src/bin/ui/workspace/groupedit.c
@@ -93,7 +93,6 @@ _groupedit_smart_add(Evas_Object *o)
 
    priv->obj = o;
    priv->con_current_size = (Groupedit_Geom *)mem_calloc(1, 
sizeof(Groupedit_Geom));
-   priv->real_size = (Groupedit_Geom *)mem_calloc(1, sizeof(Groupedit_Geom));
    priv->zoom_factor = 1.0;
    priv->parts = NULL;
    priv->obj_area.obj = edje_object_add(priv->e);
@@ -124,7 +123,6 @@ _groupedit_smart_del(Evas_Object *o)
    evas_object_hide(sd->group->edit_object);
    evas_object_del(sd->edit_obj_clipper);
 
-   free(sd->real_size);
    free(sd->con_current_size);
    free(sd->obj_area.geom);
 
diff --git a/src/bin/ui/workspace/groupedit_calc.c 
b/src/bin/ui/workspace/groupedit_calc.c
index b7a6600..5b03c15 100644
--- a/src/bin/ui/workspace/groupedit_calc.c
+++ b/src/bin/ui/workspace/groupedit_calc.c
@@ -601,8 +601,6 @@ _part_table_add(Ws_Groupedit_Smart_Data *sd, Groupedit_Part 
*gp)
    for (i = 0; i < col; i++)
      free(items_draw[i]);
    free(items_draw);
-
-
 }
 
 /* get from edje_util.c:2935 */
@@ -758,53 +756,6 @@ _part_container_del(Groupedit_Part *gp)
    gp->container = NULL;
 }
 
-#define GP_REAL_GEOMETRY_CALC(PART_X, PART_Y, ABS_X, ABS_Y) \
-   w *= sd->zoom_factor; h *= sd->zoom_factor; \
-   PART_X = x * sd->zoom_factor + xe + offset_x; \
-   PART_Y = y * sd->zoom_factor + ye + offset_y; \
-   ABS_X = abs(sd->real_size->x - PART_X); \
-   ABS_Y = abs(sd->real_size->y - PART_Y); \
-   if (PART_X > sd->real_size->x) \
-     w += ABS_X; \
-   else \
-     { \
-        sd->real_size->w += ABS_X; \
-        sd->real_size->x = PART_X; \
-     } \
-   if (PART_Y > sd->real_size->y) \
-     h += ABS_Y; \
-   else \
-     { \
-        sd->real_size->h += ABS_Y; \
-        sd->real_size->y = PART_Y; \
-     } \
-   if (sd->real_size->w < w) \
-     sd->real_size->w = w; \
-   if (sd->real_size->h < h) \
-     sd->real_size->h = h;
-
-#define ZOOM_APPLY(OBJECT) \
-   if (fabs(sd->zoom_factor - 1.0) > 0.00001) \
-     { \
-        evas_object_geometry_get(OBJECT, &x, &y, NULL, NULL); \
-        Evas_Map *m = evas_map_new(4); \
-        evas_map_smooth_set(m, false); \
-        evas_map_util_points_populate_from_object_full(m, OBJECT, 0); \
-        evas_map_util_zoom(m, sd->zoom_factor, sd->zoom_factor, x, y); \
-        evas_object_map_set(OBJECT, m); \
-        evas_object_map_enable_set(OBJECT, true); \
-        evas_map_free(m); \
-        evas_object_repeat_events_set(OBJECT, true); \
-     } \
-   else \
-     { \
-        evas_object_map_enable_set(OBJECT, false); \
-        evas_object_repeat_events_set(OBJECT, false); \
-     }
-
-#undef GP_REAL_GEOMETRY_CALC
-#undef ZOOM_APPLY
-
 static void
 _part_calc(Ws_Groupedit_Smart_Data *sd, Groupedit_Part *gp)
 {
@@ -858,12 +809,6 @@ _part_update(Ws_Groupedit_Smart_Data *sd, Groupedit_Part 
*gp)
 
    if (!sd->parts) return false;
 
-   evas_object_geometry_get(sd->obj, &sd->real_size->x,
-                            &sd->real_size->y,
-                            &sd->real_size->w,
-                            &sd->real_size->h);
-
-
    switch (gp->part->type)
      {
       case EDJE_PART_TYPE_TEXT:
diff --git a/src/bin/ui/workspace/groupedit_private.h 
b/src/bin/ui/workspace/groupedit_private.h
index 27d3fa3..2e3bb04 100644
--- a/src/bin/ui/workspace/groupedit_private.h
+++ b/src/bin/ui/workspace/groupedit_private.h
@@ -80,7 +80,6 @@ struct _Ws_Groupedit_Smart_Data
       int h; /* default: -1, size is not limited */
    } con_size_max;
    Groupedit_Geom *con_current_size;
-   Groupedit_Geom *real_size;
    struct {
       Evas_Object *obj;
       int w, h;

-- 


Reply via email to