diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/elc_fileselector.c | 6 | ||||
-rw-r--r-- | src/lib/elm_dbus_menu.c | 3 | ||||
-rw-r--r-- | src/lib/elm_diskselector.c | 19 | ||||
-rw-r--r-- | src/lib/elm_genlist.c | 2 | ||||
-rw-r--r-- | src/lib/elm_glview.c | 11 | ||||
-rw-r--r-- | src/lib/elm_interface_scrollable.c | 22 | ||||
-rw-r--r-- | src/lib/elm_map.c | 2 | ||||
-rw-r--r-- | src/lib/elm_mapbuf.c | 3 | ||||
-rw-r--r-- | src/lib/elm_theme.c | 2 |
9 files changed, 19 insertions, 51 deletions
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c index ab6f051f4..49bfbd399 100644 --- a/src/lib/elc_fileselector.c +++ b/src/lib/elc_fileselector.c @@ -46,9 +46,9 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { static void _elm_fileselector_smart_del_do(Elm_Fileselector_Smart_Data *sd) { - if (sd->path) eina_stringshare_del(sd->path); - if (sd->selection) eina_stringshare_del(sd->selection); - if (sd->populate_idler) free(ecore_idler_del(sd->populate_idler)); + eina_stringshare_del(sd->path); + eina_stringshare_del(sd->selection); + free(ecore_idler_del(sd->populate_idler)); eo_do_super(sd->obj, MY_CLASS, evas_obj_smart_del()); } diff --git a/src/lib/elm_dbus_menu.c b/src/lib/elm_dbus_menu.c index 088bb32ec..b70b132b3 100644 --- a/src/lib/elm_dbus_menu.c +++ b/src/lib/elm_dbus_menu.c @@ -920,8 +920,7 @@ _elm_dbus_menu_unregister(Eo *obj) _elm_dbus_menu_app_menu_unregister(obj); eldbus_service_interface_unregister(sd->dbus_menu->iface); eldbus_connection_unref(sd->dbus_menu->bus); - if (sd->dbus_menu->signal_idler) - ecore_idler_del(sd->dbus_menu->signal_idler); + ecore_idler_del(sd->dbus_menu->signal_idler); eina_hash_free(sd->dbus_menu->elements); free(sd->dbus_menu); diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c index b25908366..077ef43cc 100644 --- a/src/lib/elm_diskselector.c +++ b/src/lib/elm_diskselector.c @@ -226,11 +226,7 @@ _string_check(void *data) Evas_Object *obj = data; ELM_DISKSELECTOR_DATA_GET(obj, sd); - if (sd->string_check_idle_enterer) - { - ecore_idle_enterer_del(sd->string_check_idle_enterer); - sd->string_check_idle_enterer = NULL; - } + ELM_SAFE_FREE(sd->string_check_idle_enterer, ecore_idle_enterer_del); // call string check idle enterer directly _string_check_idle_enterer_cb(data); @@ -1421,17 +1417,8 @@ _elm_diskselector_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) } sd->r_items = eina_list_free(sd->r_items); - if (sd->scroller_move_idle_enterer) - { - ecore_idle_enterer_del(sd->scroller_move_idle_enterer); - sd->scroller_move_idle_enterer = NULL; - } - - if (sd->string_check_idle_enterer) - { - ecore_idle_enterer_del(sd->string_check_idle_enterer); - sd->string_check_idle_enterer = NULL; - } + ELM_SAFE_FREE(sd->scroller_move_idle_enterer, ecore_idle_enterer_del); + ELM_SAFE_FREE(sd->string_check_idle_enterer, ecore_idle_enterer_del); eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); } diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 8b7cf6ada..3f15d67cf 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -4012,7 +4012,7 @@ _item_idle_enterer(void *data) static void _requeue_idle_enterer(Elm_Genlist_Smart_Data *sd) { - if (sd->queue_idle_enterer) ecore_idle_enterer_del(sd->queue_idle_enterer); + ecore_idle_enterer_del(sd->queue_idle_enterer); sd->queue_idle_enterer = ecore_idle_enterer_add(_item_idle_enterer, sd->obj); } diff --git a/src/lib/elm_glview.c b/src/lib/elm_glview.c index 766fa44a6..8dccb8540 100644 --- a/src/lib/elm_glview.c +++ b/src/lib/elm_glview.c @@ -171,12 +171,8 @@ _set_render_policy_callback(Evas_Object *obj) switch (sd->render_policy) { case ELM_GLVIEW_RENDER_POLICY_ON_DEMAND: - // Delete idle_enterer if it for some reason is around - if (sd->render_idle_enterer) - { - ecore_idle_enterer_del(sd->render_idle_enterer); - sd->render_idle_enterer = NULL; - } + // Delete idle_enterer if it for some reason is around + ELM_SAFE_FREE(sd->render_idle_enterer, ecore_idle_enterer_del); // Set pixel getter callback evas_object_image_pixels_get_callback_set @@ -267,8 +263,7 @@ _elm_glview_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) sd->del_func(obj); } - if (sd->render_idle_enterer) - ecore_idle_enterer_del(sd->render_idle_enterer); + ecore_idle_enterer_del(sd->render_idle_enterer); if (sd->surface) evas_gl_surface_destroy(sd->evasgl, sd->surface); if (sd->context) evas_gl_context_destroy(sd->evasgl, sd->context); diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index 046ad63d3..0f168d73f 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -1461,10 +1461,7 @@ _elm_scroll_bounce_eval(Elm_Scrollable_Smart_Interface_Data *sid) if (sid->content_info.resized) _elm_scroll_wanted_region_set(sid->obj); } - if (sid->down.hold_enterer) - { - ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); - } + ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); eo_do(sid->pan_obj, elm_obj_pan_pos_max_get(&mx, &my)); eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&minx, &miny)); @@ -1790,10 +1787,7 @@ _elm_scroll_content_region_show_internal(Evas_Object *obj, if (sid->content_info.resized) _elm_scroll_wanted_region_set(sid->obj); } - if (sid->down.hold_enterer) - { - ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); - } + ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); if (sid->down.momentum_animator) { ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del); @@ -2639,10 +2633,7 @@ _elm_scroll_mouse_up_event_cb(void *data, if (sid->content_info.resized) _elm_scroll_wanted_region_set(sid->obj); } - if (sid->down.hold_enterer) - { - ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); - } + ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); if (sid->down.scroll) { ev->event_flags |= EVAS_EVENT_FLAG_ON_SCROLL; @@ -2729,10 +2720,7 @@ _elm_scroll_mouse_down_event_cb(void *data, if (sid->content_info.resized) _elm_scroll_wanted_region_set(sid->obj); } - if (sid->down.hold_enterer) - { - ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); - } + ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del); if (sid->down.momentum_animator) { ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del); @@ -3047,7 +3035,7 @@ _elm_scroll_hold_animator(void *data) { Elm_Scrollable_Smart_Interface_Data *sid = data; - if (sid->down.hold_enterer) ecore_idle_enterer_del(sid->down.hold_enterer); + ecore_idle_enterer_del(sid->down.hold_enterer); sid->down.hold_enterer = ecore_idle_enterer_before_add(_elm_scroll_hold_enterer, sid); return ECORE_CALLBACK_RENEW; diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c index 4064f0a3a..6625eb85d 100644 --- a/src/lib/elm_map.c +++ b/src/lib/elm_map.c @@ -4090,7 +4090,7 @@ _elm_map_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED) _grid_all_clear(sd); // Removal of download list should be after grid clear. - if (sd->download_idler) ecore_idler_del(sd->download_idler); + ecore_idler_del(sd->download_idler); eina_list_free(sd->download_list); _source_all_unload(sd); diff --git a/src/lib/elm_mapbuf.c b/src/lib/elm_mapbuf.c index bbb88e4b6..7403db8bc 100644 --- a/src/lib/elm_mapbuf.c +++ b/src/lib/elm_mapbuf.c @@ -330,8 +330,7 @@ _destructor(Eo *obj, void *_pd, va_list *list EINA_UNUSED) { Elm_Mapbuf_Smart_Data *priv = _pd; - if (priv->idler) ecore_idler_del(priv->idler); - priv->idler = NULL; + ELM_SAFE_FREE(priv->idler, ecore_idler_del); eo_do_super(obj, MY_CLASS, eo_destructor()); } diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c index bbfca950b..58ff891b4 100644 --- a/src/lib/elm_theme.c +++ b/src/lib/elm_theme.c @@ -260,7 +260,7 @@ _elm_theme_idler_clean(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object Ecore_Idler *idler; idler = evas_object_data_get(obj, "elm-theme-reload-idler"); - if (idler) ecore_idler_del(idler); + ecore_idler_del(idler); evas_object_data_del(obj, "elm-theme-reload-idler"); } |