elm_object_signal_emit(VIEW(item), "elm,state,selected", "elm");
sd->longpressed = EINA_FALSE;
- ELM_FREE_FUNC(sd->longpress_timer, ecore_timer_del);
+ if (sd->longpress_timer) ecore_timer_del(sd->longpress_timer);
sd->longpress_timer = ecore_timer_add
(_elm_config->longpress_timeout, _on_color_long_press, data);
}
ELM_COLORSELECTOR_DATA_GET(WIDGET(item), sd);
if (ev->button != 1) return;
- ELM_FREE_FUNC(sd->longpress_timer, ecore_timer_del);
+ ELM_SAFE_FREE(sd->longpress_timer, ecore_timer_del);
elm_object_signal_emit(VIEW(item), "elm,state,unselected", "elm");
if (!sd->longpressed)
{
evas_event_callback_del_full(evas_object_evas_get(obj), EVAS_CALLBACK_CANVAS_FOCUS_IN, _mouse_in_canvas, obj);
evas_event_callback_del_full(evas_object_evas_get(obj), EVAS_CALLBACK_CANVAS_FOCUS_OUT, _mouse_out_canvas, obj);
- ELM_FREE_FUNC(sd->longpress_timer, ecore_timer_del);
- ELM_FREE_FUNC(sd->palette_name, eina_stringshare_del);
+ if (sd->longpress_timer) ecore_timer_del(sd->longpress_timer);
+ if (sd->palette_name) eina_stringshare_del(sd->palette_name);
+
#ifdef HAVE_ELEMENTARY_X
- ELM_FREE_FUNC(sd->grab.mouse_motion, ecore_event_handler_del);
- ELM_FREE_FUNC(sd->grab.mouse_up, ecore_event_handler_del);
- ELM_FREE_FUNC(sd->grab.key_up, ecore_event_handler_del);
+ if (sd->grab.mouse_motion) ecore_event_handler_del(sd->grab.mouse_motion);
+ if (sd->grab.mouse_up) ecore_event_handler_del(sd->grab.mouse_up);
+ if (sd->grab.key_up) ecore_event_handler_del(sd->grab.key_up);
#endif
_items_del(sd);