summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-22 09:55:58 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-22 10:54:28 +0900
commite64f4ff0ffb65a26c96bec98a3f9b728bab87b26 (patch)
tree887b8a54d20f72fdd577a163984a411c60708937
parentb2842f5a940d0344ea2f8bf0cdb06dae981f9726 (diff)
elm: Removed unnecessary null check for ecore_idler_del, ecore_idle_enterer_del.
-rw-r--r--src/lib/elc_fileselector.c6
-rw-r--r--src/lib/elm_dbus_menu.c3
-rw-r--r--src/lib/elm_diskselector.c19
-rw-r--r--src/lib/elm_genlist.c2
-rw-r--r--src/lib/elm_glview.c11
-rw-r--r--src/lib/elm_interface_scrollable.c22
-rw-r--r--src/lib/elm_map.c2
-rw-r--r--src/lib/elm_mapbuf.c3
-rw-r--r--src/lib/elm_theme.c2
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[] = {
46static void 46static void
47_elm_fileselector_smart_del_do(Elm_Fileselector_Smart_Data *sd) 47_elm_fileselector_smart_del_do(Elm_Fileselector_Smart_Data *sd)
48{ 48{
49 if (sd->path) eina_stringshare_del(sd->path); 49 eina_stringshare_del(sd->path);
50 if (sd->selection) eina_stringshare_del(sd->selection); 50 eina_stringshare_del(sd->selection);
51 if (sd->populate_idler) free(ecore_idler_del(sd->populate_idler)); 51 free(ecore_idler_del(sd->populate_idler));
52 52
53 eo_do_super(sd->obj, MY_CLASS, evas_obj_smart_del()); 53 eo_do_super(sd->obj, MY_CLASS, evas_obj_smart_del());
54} 54}
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)
920 _elm_dbus_menu_app_menu_unregister(obj); 920 _elm_dbus_menu_app_menu_unregister(obj);
921 eldbus_service_interface_unregister(sd->dbus_menu->iface); 921 eldbus_service_interface_unregister(sd->dbus_menu->iface);
922 eldbus_connection_unref(sd->dbus_menu->bus); 922 eldbus_connection_unref(sd->dbus_menu->bus);
923 if (sd->dbus_menu->signal_idler) 923 ecore_idler_del(sd->dbus_menu->signal_idler);
924 ecore_idler_del(sd->dbus_menu->signal_idler);
925 924
926 eina_hash_free(sd->dbus_menu->elements); 925 eina_hash_free(sd->dbus_menu->elements);
927 free(sd->dbus_menu); 926 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)
226 Evas_Object *obj = data; 226 Evas_Object *obj = data;
227 ELM_DISKSELECTOR_DATA_GET(obj, sd); 227 ELM_DISKSELECTOR_DATA_GET(obj, sd);
228 228
229 if (sd->string_check_idle_enterer) 229 ELM_SAFE_FREE(sd->string_check_idle_enterer, ecore_idle_enterer_del);
230 {
231 ecore_idle_enterer_del(sd->string_check_idle_enterer);
232 sd->string_check_idle_enterer = NULL;
233 }
234 230
235 // call string check idle enterer directly 231 // call string check idle enterer directly
236 _string_check_idle_enterer_cb(data); 232 _string_check_idle_enterer_cb(data);
@@ -1421,17 +1417,8 @@ _elm_diskselector_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
1421 } 1417 }
1422 sd->r_items = eina_list_free(sd->r_items); 1418 sd->r_items = eina_list_free(sd->r_items);
1423 1419
1424 if (sd->scroller_move_idle_enterer) 1420 ELM_SAFE_FREE(sd->scroller_move_idle_enterer, ecore_idle_enterer_del);
1425 { 1421 ELM_SAFE_FREE(sd->string_check_idle_enterer, ecore_idle_enterer_del);
1426 ecore_idle_enterer_del(sd->scroller_move_idle_enterer);
1427 sd->scroller_move_idle_enterer = NULL;
1428 }
1429
1430 if (sd->string_check_idle_enterer)
1431 {
1432 ecore_idle_enterer_del(sd->string_check_idle_enterer);
1433 sd->string_check_idle_enterer = NULL;
1434 }
1435 1422
1436 eo_do_super(obj, MY_CLASS, evas_obj_smart_del()); 1423 eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
1437} 1424}
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)
4012static void 4012static void
4013_requeue_idle_enterer(Elm_Genlist_Smart_Data *sd) 4013_requeue_idle_enterer(Elm_Genlist_Smart_Data *sd)
4014{ 4014{
4015 if (sd->queue_idle_enterer) ecore_idle_enterer_del(sd->queue_idle_enterer); 4015 ecore_idle_enterer_del(sd->queue_idle_enterer);
4016 sd->queue_idle_enterer = ecore_idle_enterer_add(_item_idle_enterer, sd->obj); 4016 sd->queue_idle_enterer = ecore_idle_enterer_add(_item_idle_enterer, sd->obj);
4017} 4017}
4018 4018
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)
171 switch (sd->render_policy) 171 switch (sd->render_policy)
172 { 172 {
173 case ELM_GLVIEW_RENDER_POLICY_ON_DEMAND: 173 case ELM_GLVIEW_RENDER_POLICY_ON_DEMAND:
174 // Delete idle_enterer if it for some reason is around 174 // Delete idle_enterer if it for some reason is around
175 if (sd->render_idle_enterer) 175 ELM_SAFE_FREE(sd->render_idle_enterer, ecore_idle_enterer_del);
176 {
177 ecore_idle_enterer_del(sd->render_idle_enterer);
178 sd->render_idle_enterer = NULL;
179 }
180 176
181 // Set pixel getter callback 177 // Set pixel getter callback
182 evas_object_image_pixels_get_callback_set 178 evas_object_image_pixels_get_callback_set
@@ -267,8 +263,7 @@ _elm_glview_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
267 sd->del_func(obj); 263 sd->del_func(obj);
268 } 264 }
269 265
270 if (sd->render_idle_enterer) 266 ecore_idle_enterer_del(sd->render_idle_enterer);
271 ecore_idle_enterer_del(sd->render_idle_enterer);
272 267
273 if (sd->surface) evas_gl_surface_destroy(sd->evasgl, sd->surface); 268 if (sd->surface) evas_gl_surface_destroy(sd->evasgl, sd->surface);
274 if (sd->context) evas_gl_context_destroy(sd->evasgl, sd->context); 269 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)
1461 if (sid->content_info.resized) 1461 if (sid->content_info.resized)
1462 _elm_scroll_wanted_region_set(sid->obj); 1462 _elm_scroll_wanted_region_set(sid->obj);
1463 } 1463 }
1464 if (sid->down.hold_enterer) 1464 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
1465 {
1466 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
1467 }
1468 1465
1469 eo_do(sid->pan_obj, elm_obj_pan_pos_max_get(&mx, &my)); 1466 eo_do(sid->pan_obj, elm_obj_pan_pos_max_get(&mx, &my));
1470 eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&minx, &miny)); 1467 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,
1790 if (sid->content_info.resized) 1787 if (sid->content_info.resized)
1791 _elm_scroll_wanted_region_set(sid->obj); 1788 _elm_scroll_wanted_region_set(sid->obj);
1792 } 1789 }
1793 if (sid->down.hold_enterer) 1790 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
1794 {
1795 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
1796 }
1797 if (sid->down.momentum_animator) 1791 if (sid->down.momentum_animator)
1798 { 1792 {
1799 ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del); 1793 ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del);
@@ -2639,10 +2633,7 @@ _elm_scroll_mouse_up_event_cb(void *data,
2639 if (sid->content_info.resized) 2633 if (sid->content_info.resized)
2640 _elm_scroll_wanted_region_set(sid->obj); 2634 _elm_scroll_wanted_region_set(sid->obj);
2641 } 2635 }
2642 if (sid->down.hold_enterer) 2636 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
2643 {
2644 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
2645 }
2646 if (sid->down.scroll) 2637 if (sid->down.scroll)
2647 { 2638 {
2648 ev->event_flags |= EVAS_EVENT_FLAG_ON_SCROLL; 2639 ev->event_flags |= EVAS_EVENT_FLAG_ON_SCROLL;
@@ -2729,10 +2720,7 @@ _elm_scroll_mouse_down_event_cb(void *data,
2729 if (sid->content_info.resized) 2720 if (sid->content_info.resized)
2730 _elm_scroll_wanted_region_set(sid->obj); 2721 _elm_scroll_wanted_region_set(sid->obj);
2731 } 2722 }
2732 if (sid->down.hold_enterer) 2723 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
2733 {
2734 ELM_SAFE_FREE(sid->down.hold_enterer, ecore_idle_enterer_del);
2735 }
2736 if (sid->down.momentum_animator) 2724 if (sid->down.momentum_animator)
2737 { 2725 {
2738 ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del); 2726 ELM_SAFE_FREE(sid->down.momentum_animator, ecore_animator_del);
@@ -3047,7 +3035,7 @@ _elm_scroll_hold_animator(void *data)
3047{ 3035{
3048 Elm_Scrollable_Smart_Interface_Data *sid = data; 3036 Elm_Scrollable_Smart_Interface_Data *sid = data;
3049 3037
3050 if (sid->down.hold_enterer) ecore_idle_enterer_del(sid->down.hold_enterer); 3038 ecore_idle_enterer_del(sid->down.hold_enterer);
3051 sid->down.hold_enterer = 3039 sid->down.hold_enterer =
3052 ecore_idle_enterer_before_add(_elm_scroll_hold_enterer, sid); 3040 ecore_idle_enterer_before_add(_elm_scroll_hold_enterer, sid);
3053 return ECORE_CALLBACK_RENEW; 3041 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)
4090 4090
4091 _grid_all_clear(sd); 4091 _grid_all_clear(sd);
4092 // Removal of download list should be after grid clear. 4092 // Removal of download list should be after grid clear.
4093 if (sd->download_idler) ecore_idler_del(sd->download_idler); 4093 ecore_idler_del(sd->download_idler);
4094 eina_list_free(sd->download_list); 4094 eina_list_free(sd->download_list);
4095 4095
4096 _source_all_unload(sd); 4096 _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)
330{ 330{
331 Elm_Mapbuf_Smart_Data *priv = _pd; 331 Elm_Mapbuf_Smart_Data *priv = _pd;
332 332
333 if (priv->idler) ecore_idler_del(priv->idler); 333 ELM_SAFE_FREE(priv->idler, ecore_idler_del);
334 priv->idler = NULL;
335 334
336 eo_do_super(obj, MY_CLASS, eo_destructor()); 335 eo_do_super(obj, MY_CLASS, eo_destructor());
337} 336}
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
260 Ecore_Idler *idler; 260 Ecore_Idler *idler;
261 261
262 idler = evas_object_data_get(obj, "elm-theme-reload-idler"); 262 idler = evas_object_data_get(obj, "elm-theme-reload-idler");
263 if (idler) ecore_idler_del(idler); 263 ecore_idler_del(idler);
264 evas_object_data_del(obj, "elm-theme-reload-idler"); 264 evas_object_data_del(obj, "elm-theme-reload-idler");
265} 265}
266 266