seoz pushed a commit to branch master.

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

commit a54da8aab46176525f9db88300af74e21553be91
Author: Jee-Yong Um <jc9...@samsung.com>
Date:   Wed Feb 11 16:49:24 2015 +0900

    elm_toolbar: remove code duplication
    
    Summary:
    elm_coords_finger_size_adjust() is called twice.
    It might not be intended.
    
    Reviewers: Hermet, Jaehyun, seoz
    
    Reviewed By: seoz
    
    Subscribers: raster, seoz, Hermet
    
    Differential Revision: https://phab.enlightenment.org/D1924
---
 src/lib/elm_toolbar.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 6508193..f3a1f1a 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -1176,7 +1176,7 @@ _item_theme_hook(Evas_Object *obj,
                  double scale,
                  int icon_size)
 {
-   Evas_Coord mw, mh, minw, minh;
+   Evas_Coord mw = -1, mh = -1;
    Evas_Object *view = VIEW(it);
    const char *style;
 
@@ -1258,16 +1258,13 @@ _item_theme_hook(Evas_Object *obj,
           }
      }
 
-   mw = mh = minw = minh = -1;
-   if (!it->separator && !it->object)
-     elm_coords_finger_size_adjust(1, &mw, 1, &mh);
-
    // If the min size is changed by edje signal in edc,
    //the below function should be called before the calculation.
    edje_object_message_signal_process(view);
-   edje_object_size_min_restricted_calc(view, &mw, &mh, mw, mh);
+
    if (!it->separator && !it->object)
      elm_coords_finger_size_adjust(1, &mw, 1, &mh);
+   edje_object_size_min_restricted_calc(view, &mw, &mh, mw, mh);
    evas_object_size_hint_min_set(view, mw, mh);
 }
 

-- 


Reply via email to