From a3dccff6e1f0760c9d7e15a27173718f23a23ac1 Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Thu, 31 Oct 2013 14:09:18 +0900 Subject: [PATCH] Fix the AO unregister code Change-Id: I42aca95ca1333d2d3e0312b9a1532bd33414b3f1 --- src/script_port.c | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/src/script_port.c b/src/script_port.c index 1be41ea..a3f857a 100644 --- a/src/script_port.c +++ b/src/script_port.c @@ -693,7 +693,6 @@ PUBLIC int script_update_image(void *_h, Evas *e, const char *id, const char *pa if (img) { Eina_List *l; Eina_List *n; - Evas_Object *ao; EINA_LIST_FOREACH_SAFE(obj_info->children, l, n, child) { if (child->obj != img) { @@ -707,13 +706,6 @@ PUBLIC int script_update_image(void *_h, Evas *e, const char *id, const char *pa } DbgPrint("delete object %s %p\n", part, img); - ao = evas_object_data_del(img, "ao"); - if (ao) { - handle->access_chain = eina_list_remove(handle->access_chain, img); - (void)evas_object_data_del(ao, "edje"); - elm_access_object_unregister(ao); - DbgPrint("Successfully unregistered\n"); - } evas_object_del(img); } @@ -1076,13 +1068,6 @@ static void edje_del_cb(void *_info, Evas *e, Evas_Object *obj, void *event_info EINA_LIST_FREE(obj_info->children, child) { DbgPrint("delete object %s %p\n", child->part, child->obj); if (child->obj) { - ao = evas_object_data_del(child->obj, "ao"); - if (ao) { - /* Accesssibility is enhanced object */ - handle->access_chain = eina_list_remove(handle->access_chain, child->obj); - (void)evas_object_data_del(child->obj, "ao"); - elm_access_object_unregister(ao); - } evas_object_del(child->obj); } free(child->part); @@ -1094,18 +1079,15 @@ static void edje_del_cb(void *_info, Evas *e, Evas_Object *obj, void *event_info if (ao) { edje = evas_object_data_get(ao, "edje"); } else { - edje = evas_object_data_get(edje_part, "edje"); + ErrPrint("edje_part has no ao\n"); + continue; } if (edje == obj) { - if (ao) { - (void)evas_object_data_del(edje_part, "ao"); - (void)evas_object_data_del(ao, "edje"); - elm_access_object_unregister(ao); - } else { - (void)evas_object_data_del(edje_part, "edje"); - elm_access_object_unregister(edje_part); - } + handle->access_chain = eina_list_remove(handle->access_chain, edje_part); + (void)evas_object_data_del(edje_part, "ao"); + (void)evas_object_data_del(ao, "edje"); + elm_access_object_unregister(ao); } } -- 2.7.4