seoz pushed a commit to branch master.

commit e0246ba7cf6081f1d3e5ac34becabd64d376f0ae
Author: Daniel Juyung Seo <[email protected]>
Date:   Tue Apr 30 00:50:25 2013 +0900

    elm_toolbar.c: refactoring. reuse api return value.
---
 src/lib/elm_toolbar.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 0c12e08..fea0e7e 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -1566,15 +1566,15 @@ _item_transition_start
 (Elm_Toolbar_Item *it, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 {
    Evas_Coord tx, ty;
-   Evas_Object *obj = WIDGET(it);
+   Evas_Object *obj = WIDGET(it), *img = NULL;
    ELM_TOOLBAR_DATA_GET(obj, sd);
 
    it->proxy = elm_image_add(obj);
+   img = elm_image_object_get(it->proxy);
    elm_image_aspect_fixed_set(it->proxy, EINA_FALSE);
-   evas_object_image_source_set(elm_image_object_get(it->proxy), VIEW(it));
-   evas_object_image_source_visible_set(elm_image_object_get(it->proxy), 
EINA_FALSE);
-   evas_object_image_source_clip_set(elm_image_object_get(it->proxy),
-                                     EINA_FALSE);
+   evas_object_image_source_set(img, VIEW(it));
+   evas_object_image_source_visible_set(img, EINA_FALSE);
+   evas_object_image_source_clip_set(img, EINA_FALSE);
 
    it->trans = elm_transit_add();
    elm_transit_object_add(it->trans, it->proxy);
@@ -1741,7 +1741,7 @@ _mouse_up_reorder(Elm_Toolbar_Item *it,
 static void
 _item_reorder_start(Elm_Toolbar_Item *item)
 {
-   Evas_Object *obj = WIDGET(item);
+   Evas_Object *obj = WIDGET(item), *img = NULL;
    Evas_Coord x, y, w, h;
 
    ELM_TOOLBAR_DATA_GET(obj, sd);
@@ -1749,11 +1749,11 @@ _item_reorder_start(Elm_Toolbar_Item *item)
    sd->reorder_empty = sd->reorder_item = item;
 
    item->proxy = elm_image_add(obj);
+   img = elm_image_object_get(item->proxy);
    elm_image_aspect_fixed_set(item->proxy, EINA_FALSE);
-   evas_object_image_source_set(elm_image_object_get(item->proxy), VIEW(item));
-   evas_object_image_source_visible_set(elm_image_object_get(item->proxy), 
EINA_FALSE);
-   evas_object_image_source_clip_set(elm_image_object_get(item->proxy),
-                                     EINA_FALSE);
+   evas_object_image_source_set(img, VIEW(item));
+   evas_object_image_source_visible_set(img, EINA_FALSE);
+   evas_object_image_source_clip_set(img, EINA_FALSE);
 
    evas_object_layer_set(item->proxy, 100);
    edje_object_signal_emit(VIEW(item), "elm,state,moving", "elm");

-- 

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr

Reply via email to