parent
13475e140c
commit
2462795896
|
@ -354,10 +354,10 @@ edgar_theme_object_set(Edgar_Py_Gadget *gadget, Evas_Object *obj, const char *gr
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EFL_VERSION_1_18
|
#ifdef EFL_VERSION_1_18
|
||||||
static Eina_Bool
|
static void
|
||||||
edgar_popup_del_cb(void *data, const Eo_Event *event)
|
edgar_popup_del_cb(void *data, const Eo_Event *event)
|
||||||
{
|
{
|
||||||
Eo *obj = event->obj;
|
Eo *obj = event->object;
|
||||||
#else
|
#else
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
edgar_popup_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
|
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 *pyobj = object_from_instance(obj);
|
||||||
PyObject *ret = PyObject_CallMethod(gadget->instance, "popup_destroyed",
|
PyObject *ret = PyObject_CallMethod(gadget->instance, "popup_destroyed",
|
||||||
"(S)", pyobj);
|
"(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()");
|
PY_ON_ERROR_RETURN(!ret, EO_CALLBACK_CONTINUE, "Cannot call popup_destroyed()");
|
||||||
|
#endif
|
||||||
Py_DECREF(pyobj);
|
Py_DECREF(pyobj);
|
||||||
Py_DECREF(ret);
|
Py_DECREF(ret);
|
||||||
|
|
||||||
gadget->pops_obj = eina_list_remove(gadget->pops_obj, obj);
|
gadget->pops_obj = eina_list_remove(gadget->pops_obj, obj);
|
||||||
|
|
||||||
|
#ifndef EFL_VERSION_1_18
|
||||||
return EO_CALLBACK_CONTINUE;
|
return EO_CALLBACK_CONTINUE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static E_Gadcon_Popup *
|
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.
|
// NOTE: del cb with priority to be called before the python-efl one.
|
||||||
// Otherwise python-efl delete the python obj too soon
|
// Otherwise python-efl delete the python obj too soon
|
||||||
#ifdef EFL_VERSION_1_18
|
#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);
|
EO_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget);
|
||||||
#else
|
#else
|
||||||
eo_do(content, eo_event_callback_priority_add(
|
eo_do(content, eo_event_callback_priority_add(
|
||||||
|
|
Loading…
Reference in New Issue