seoz pushed a commit to branch master.
commit 4ed76f618271ea3fbcc5ff58f085cc241d87ac9e
Author: Daniel Juyung Seo <[email protected]>
Date: Wed May 29 21:08:50 2013 +0900
elm_toolbar.c: ELM_SAFE_FREE adoption.
I splited ELM_SAFE_FREE refactoring patches. One commit per each file as
recommended.
For the detail, please refer 3072dab12f12fe83fb5a628d15efd5cded11787f.
---
src/lib/elm_toolbar.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 99eeec8..5e18fcd 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -736,7 +736,7 @@ _resize_cb(void *data,
evas_object_geometry_get(data, &x, &y, NULL, &h);
evas_object_move(sd->more, x, y + h);
- ELM_FREE_FUNC(sd->resize_job, ecore_job_del);
+ if (sd->resize_job) ecore_job_del(sd->resize_job);
sd->resize_job = ecore_job_add(_resize_job, data);
}
@@ -1830,7 +1830,7 @@ static void
_drag_start_cb(Evas_Object *obj, void *data __UNUSED__)
{
ELM_TOOLBAR_DATA_GET(obj, sd);
- ELM_FREE_FUNC(sd->long_timer, ecore_timer_del);
+ ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
}
static void
@@ -1847,7 +1847,7 @@ _mouse_move_cb(Elm_Toolbar_Item *it,
if ((x > ev->cur.canvas.x) || (ev->cur.canvas.x > x + w) ||
(y > ev->cur.canvas.y) || (ev->cur.canvas.y > y + h))
{
- ELM_FREE_FUNC(sd->long_timer, ecore_timer_del);
+ ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
}
}
@@ -1883,7 +1883,7 @@ _mouse_up_cb(Elm_Toolbar_Item *it,
ELM_TOOLBAR_DATA_GET(WIDGET(it), sd);
if (ev->button != 1) return;
- ELM_FREE_FUNC(sd->long_timer, ecore_timer_del);
+ ELM_SAFE_FREE(sd->long_timer, ecore_timer_del);
evas_object_event_callback_del_full
(VIEW(it), EVAS_CALLBACK_MOUSE_MOVE,
(Evas_Object_Event_Cb)_mouse_move_cb, it);
@@ -2554,8 +2554,8 @@ _elm_toolbar_smart_del(Eo *obj, void *_pd, va_list *list
EINA_UNUSED)
elm_widget_item_del(it);
it = next;
}
- ELM_FREE_FUNC(sd->more_item, elm_widget_item_del);
- ELM_FREE_FUNC(sd->long_timer, ecore_timer_del);
+ if (sd->more_item) elm_widget_item_del(sd->more_item);
+ if (sd->long_timer) ecore_timer_del(sd->long_timer);
eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
}
--
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1