rimmed pushed a commit to branch master.

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

commit da1b6b31cdef8f9b44fc4480469f364b68f3d843
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Fri Apr 1 13:20:14 2016 +0300

    workspace: use the container_geom_get instead container_content_size_get
    
    Change-Id: I99a87f93cd432deb8ab674978bcf7eb4e551378b
---
 src/bin/ui/workspace/container.c | 11 -----------
 src/bin/ui/workspace/container.h | 14 --------------
 src/bin/ui/workspace/workspace.c | 19 ++++++++++---------
 3 files changed, 10 insertions(+), 34 deletions(-)

diff --git a/src/bin/ui/workspace/container.c b/src/bin/ui/workspace/container.c
index c20ee03..b242845 100644
--- a/src/bin/ui/workspace/container.c
+++ b/src/bin/ui/workspace/container.c
@@ -497,17 +497,6 @@ container_geom_get(Evas_Object *obj)
 }
 
 Eina_Bool
-container_container_size_get(Evas_Object *obj, int *w, int *h)
-{
-   CONTAINER_DATA_GET(obj, sd);
-
-   if (w) *w = sd->size.w;
-   if (h) *h = sd->size.h;
-
-   return true;
-}
-
-Eina_Bool
 container_style_set(Evas_Object *obj, const char *style)
 {
    CONTAINER_DATA_GET(obj, sd);
diff --git a/src/bin/ui/workspace/container.h b/src/bin/ui/workspace/container.h
index d4c37e7..f735531 100644
--- a/src/bin/ui/workspace/container.h
+++ b/src/bin/ui/workspace/container.h
@@ -143,20 +143,6 @@ Eina_Bool
 container_container_size_set(Evas_Object *obj, int w, int h);
 
 /**
- * Get the size of container.
- *
- * @param obj The Container object,
- * @param w The int pointer where width will be set,
- * @param h The int pointer where height will be set.
- *
- * @return EINA_TRUE on success or EINA_FALSE, on errors.
- *
- * @ingroup Container
- */
-Eina_Bool
-container_container_size_get(Evas_Object *obj, int *w, int *h);
-
-/**
  * Get the container geom
  *
  * @param obj The Container object.
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 90806be..c7c57d5 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -574,7 +574,7 @@ _mode_cb(void *data,
    Workspace_Mode mode;
    Evas_Object *content;
    Scroll_Area *area = NULL;
-   int w = 0, h = 0;
+   const Container_Geom *geom;
 
    mode = elm_radio_value_get(obj);
    if (mode == wd->mode) return;
@@ -642,9 +642,9 @@ _mode_cb(void *data,
 
    elm_check_state_set(wd->toolbar.container_sizer.check_lock, 
container_lock_get(area->container));
 
-   container_container_size_get(area->container, &w, &h);
-   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_w, w);
-   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_h, h);
+   geom = container_geom_get(area->container);
+   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_w, geom->w);
+   elm_spinner_value_set(wd->toolbar.container_sizer.spinner_h, geom->h);
 }
 
 static void
@@ -1250,10 +1250,11 @@ workspace_container_fill(Evas_Object *obj)
 void
 workspace_container_fit(Evas_Object *obj)
 {
-   int w, h, cw, ch;
+   int w, h;
    double zoom;
    int r, t, l, b;
    Scroll_Area *area;
+   const Container_Geom *geom;
 
    WS_DATA_GET(obj);
 
@@ -1262,13 +1263,13 @@ workspace_container_fit(Evas_Object *obj)
    area = _scroll_area_get(wd);
    /* get the bg size, because bg size not included the scrollbar size */
    evas_object_geometry_get(area->bg, NULL, NULL, &w, &h);
-   container_container_size_get(area->container, &cw, &ch);
+   geom = container_geom_get(area->container);
    container_padding_size_get(area->container, &r, &t, &l, &b);
 
-   if (cw >= ch)
-     zoom = (w - l - r) / (double)cw;
+   if (geom->w >= geom->h)
+     zoom = (w - l - r) / (double)geom->w;
    else
-     zoom = (h - t - b) / (double)ch;
+     zoom = (h - t - b) / (double)geom->h;
 
    workspace_zoom_factor_set(obj, zoom);
 }

-- 


Reply via email to