summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_access.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung@gmail.com>2013-05-22 02:24:02 +0900
committerDaniel Juyung Seo <seojuyung@gmail.com>2013-05-22 02:24:02 +0900
commitac25946a19f1ccc71bf5024a67e6067266068d0e (patch)
tree52d4deb50fd1d4a6cfdefe6cb0fd878895e0071b /legacy/elementary/src/lib/elm_access.c
parentd62689ca06f45dc87fd3af25ebecfc64612cd6dd (diff)
elm: introduce ELM_FREE_FUNC for code quality enhancement.
There are pros and cons but this 1. reduces human mistakes. 2. enhances readability. 3. enhances code quality. 4. removes future bug. 5. was adopted from enlightenment. This is not all. I will work on enhancing elementary more and more.
Diffstat (limited to 'legacy/elementary/src/lib/elm_access.c')
-rw-r--r--legacy/elementary/src/lib/elm_access.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c
index a6120ad..ec74f66 100644
--- a/legacy/elementary/src/lib/elm_access.c
+++ b/legacy/elementary/src/lib/elm_access.c
@@ -297,11 +297,8 @@ _access_obj_mouse_in_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
297 ac = evas_object_data_get(data, "_elm_access"); 297 ac = evas_object_data_get(data, "_elm_access");
298 if (!ac) return; 298 if (!ac) return;
299 299
300 if (ac->delay_timer) 300 ELM_FREE_FUNC(ac->delay_timer, ecore_timer_del);
301 { 301
302 ecore_timer_del(ac->delay_timer);
303 ac->delay_timer = NULL;
304 }
305 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF) 302 if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
306 ac->delay_timer = ecore_timer_add(0.2, _access_obj_over_timeout_cb, data); 303 ac->delay_timer = ecore_timer_add(0.2, _access_obj_over_timeout_cb, data);
307} 304}
@@ -316,11 +313,8 @@ _access_obj_mouse_out_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
316 if (!ac) return; 313 if (!ac) return;
317 314
318 _elm_access_object_unhilight(data); 315 _elm_access_object_unhilight(data);
319 if (ac->delay_timer) 316
320 { 317 ELM_FREE_FUNC(ac->delay_timer, ecore_timer_del);
321 ecore_timer_del(ac->delay_timer);
322 ac->delay_timer = NULL;
323 }
324} 318}
325 319
326static void 320static void
@@ -564,11 +558,7 @@ _elm_access_clear(Elm_Access_Info *ac)
564 Elm_Access_Item *ai; 558 Elm_Access_Item *ai;
565 559
566 if (!ac) return; 560 if (!ac) return;
567 if (ac->delay_timer) 561 ELM_FREE_FUNC(ac->delay_timer, ecore_timer_del);
568 {
569 ecore_timer_del(ac->delay_timer);
570 ac->delay_timer = NULL;
571 }
572 EINA_LIST_FREE(ac->items, ai) 562 EINA_LIST_FREE(ac->items, ai)
573 { 563 {
574 if (!ai->func) 564 if (!ai->func)