Latest Eo changes

#FollowTheWhiteRabbit (tm)
This commit is contained in:
Davide Andreoli 2016-06-26 17:45:32 +02:00
parent 13475e140c
commit 2462795896
1 changed files with 9 additions and 3 deletions

View File

@ -354,10 +354,10 @@ edgar_theme_object_set(Edgar_Py_Gadget *gadget, Evas_Object *obj, const char *gr
}
#ifdef EFL_VERSION_1_18
static Eina_Bool
static void
edgar_popup_del_cb(void *data, const Eo_Event *event)
{
Eo *obj = event->obj;
Eo *obj = event->object;
#else
static Eina_Bool
edgar_popup_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
@ -370,13 +370,19 @@ edgar_popup_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *
PyObject *pyobj = object_from_instance(obj);
PyObject *ret = PyObject_CallMethod(gadget->instance, "popup_destroyed",
"(S)", pyobj);
#ifdef EFL_VERSION_1_18
PY_ON_ERROR_RETURN(!ret, , "Cannot call popup_destroyed()");
#else
PY_ON_ERROR_RETURN(!ret, EO_CALLBACK_CONTINUE, "Cannot call popup_destroyed()");
#endif
Py_DECREF(pyobj);
Py_DECREF(ret);
gadget->pops_obj = eina_list_remove(gadget->pops_obj, obj);
#ifndef EFL_VERSION_1_18
return EO_CALLBACK_CONTINUE;
#endif
}
static E_Gadcon_Popup *
@ -395,7 +401,7 @@ edgar_popup_new(Edgar_Py_Gadget *gadget, E_Gadcon_Client *gcc)
// NOTE: del cb with priority to be called before the python-efl one.
// Otherwise python-efl delete the python obj too soon
#ifdef EFL_VERSION_1_18
eo_event_callback_priority_add(content, EO_BASE_EVENT_DEL,
eo_event_callback_priority_add(content, EO_EVENT_DEL,
EO_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget);
#else
eo_do(content, eo_event_callback_priority_add(