ephysics: fix test "rotating forever"

It should delete timers when evas object is deleted, not when
body is deleted.



SVN revision: 78492
This commit is contained in:
Bruno Dilly 2012-10-25 21:55:35 +00:00
parent 829065f97a
commit 54775f34b5
1 changed files with 3 additions and 5 deletions

View File

@ -49,9 +49,8 @@ _del_cb(void *data, EPhysics_Body *body __UNUSED__, void *event_info __UNUSED__)
}
static void
_del_torque_cb(void *data, EPhysics_Body *body __UNUSED__, void *event_info __UNUSED__)
_del_torque_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
{
Evas_Object *obj = data;
Ecore_Timer *timer;
timer = evas_object_data_get(obj, "increase_timer");
@ -155,9 +154,8 @@ _world_populate(Test_Data *test_data)
_update_object_cb, NULL);
ephysics_body_torque_apply(body, 0, 0, 2);
ephysics_body_event_callback_add(body,
EPHYSICS_CALLBACK_BODY_DEL,
_del_torque_cb, cube);
evas_object_event_callback_add(cube, EVAS_CALLBACK_DEL,
_del_torque_cb, NULL);
timer = ecore_timer_add(3, _increase_torque_cb, body);
evas_object_data_set(cube, "increase_timer", timer);