summaryrefslogtreecommitdiff
path: root/legacy/elementary
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-03-29 09:54:21 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-29 09:54:21 +0000
commit2101792842477ef9ef4ae31373bf809a02efdb4b (patch)
treeb8983b18440fd8e120b1bff8d91ab829537df060 /legacy/elementary
parent5208f9fc8050bd38507ccfaec3626ef15cd2b420 (diff)
fix next calgrind bitch. yay!
SVN revision: 69737
Diffstat (limited to 'legacy/elementary')
-rw-r--r--legacy/elementary/src/lib/elm_access.c32
-rw-r--r--legacy/elementary/src/lib/elm_widget.c2
-rw-r--r--legacy/elementary/src/lib/elm_widget.h2
3 files changed, 26 insertions, 10 deletions
diff --git a/legacy/elementary/src/lib/elm_access.c b/legacy/elementary/src/lib/elm_access.c
index 5dd8ce3da1..4ea5582883 100644
--- a/legacy/elementary/src/lib/elm_access.c
+++ b/legacy/elementary/src/lib/elm_access.c
@@ -467,26 +467,37 @@ _access_item_mouse_out_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNU
467 } 467 }
468} 468}
469 469
470static void 470static void _access_item_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__);
471_access_item_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__) 471
472EAPI void
473_elm_access_item_unregister(Elm_Widget_Item *item)
472{ 474{
473 Elm_Access_Info *ac; 475 Elm_Access_Info *ac;
474 476
475 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOUSE_IN, 477 ac = item->access;
476 _access_item_mouse_in_cb, data);
477 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_MOUSE_OUT,
478 _access_item_mouse_out_cb, data);
479 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_DEL,
480 _access_item_del_cb, data);
481 ac = ((Elm_Widget_Item *)data)->access;
482 ((Elm_Widget_Item *)data)->access = NULL;
483 if (ac) 478 if (ac)
484 { 479 {
480 evas_object_event_callback_del_full(ac->hoverobj,
481 EVAS_CALLBACK_MOUSE_IN,
482 _access_item_mouse_in_cb, item);
483 evas_object_event_callback_del_full(ac->hoverobj,
484 EVAS_CALLBACK_MOUSE_OUT,
485 _access_item_mouse_out_cb, item);
486 evas_object_event_callback_del_full(ac->hoverobj,
487 EVAS_CALLBACK_DEL,
488 _access_item_del_cb, item);
489 item->access = NULL;
485 _elm_access_clear(ac); 490 _elm_access_clear(ac);
486 free(ac); 491 free(ac);
487 } 492 }
488} 493}
489 494
495static void
496_access_item_del_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
497{
498 _elm_access_item_unregister((Elm_Widget_Item *)data);
499}
500
490EAPI void 501EAPI void
491_elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj) 502_elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj)
492{ 503{
@@ -499,6 +510,7 @@ _elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj)
499 evas_object_event_callback_add(hoverobj, EVAS_CALLBACK_DEL, 510 evas_object_event_callback_add(hoverobj, EVAS_CALLBACK_DEL,
500 _access_item_del_cb, item); 511 _access_item_del_cb, item);
501 ac = calloc(1, sizeof(Elm_Access_Info)); 512 ac = calloc(1, sizeof(Elm_Access_Info));
513 ac->hoverobj = hoverobj;
502 item->access = ac; 514 item->access = ac;
503} 515}
504 516
diff --git a/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c
index f51ff01146..f579037736 100644
--- a/legacy/elementary/src/lib/elm_widget.c
+++ b/legacy/elementary/src/lib/elm_widget.c
@@ -2859,6 +2859,8 @@ _elm_widget_item_free(Elm_Widget_Item *item)
2859 return; 2859 return;
2860 } 2860 }
2861 2861
2862 _elm_access_item_unregister(item);
2863
2862 EINA_LIST_FREE(item->callbacks, cb) free(cb); 2864 EINA_LIST_FREE(item->callbacks, cb) free(cb);
2863 2865
2864 if (item->del_func) 2866 if (item->del_func)
diff --git a/legacy/elementary/src/lib/elm_widget.h b/legacy/elementary/src/lib/elm_widget.h
index bcc9498a58..9d5de43f3d 100644
--- a/legacy/elementary/src/lib/elm_widget.h
+++ b/legacy/elementary/src/lib/elm_widget.h
@@ -228,6 +228,7 @@ struct _Elm_Access_Item
228 228
229struct _Elm_Access_Info 229struct _Elm_Access_Info
230{ 230{
231 Evas_Object *hoverobj;
231 Eina_List *items; 232 Eina_List *items;
232 Ecore_Timer *delay_timer; 233 Ecore_Timer *delay_timer;
233}; 234};
@@ -244,6 +245,7 @@ EAPI void _elm_access_object_hilight(Evas_Object *obj);
244EAPI void _elm_access_object_unhilight(Evas_Object *obj); 245EAPI void _elm_access_object_unhilight(Evas_Object *obj);
245EAPI void _elm_access_object_hilight_disable(Evas *e); 246EAPI void _elm_access_object_hilight_disable(Evas *e);
246EAPI void _elm_access_object_register(Evas_Object *obj, Evas_Object *hoverobj); 247EAPI void _elm_access_object_register(Evas_Object *obj, Evas_Object *hoverobj);
248EAPI void _elm_access_item_unregister(Elm_Widget_Item *item);
247EAPI void _elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj); 249EAPI void _elm_access_item_register(Elm_Widget_Item *item, Evas_Object *hoverobj);
248EAPI Eina_Bool _elm_access_2nd_click_timeout(Evas_Object *obj); 250EAPI Eina_Bool _elm_access_2nd_click_timeout(Evas_Object *obj);
249 251