davemds pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/modules/edgar.git/commit/?id=13475e140c605bd8c9e4d422dbd13333879fe0c6

commit 13475e140c605bd8c9e4d422dbd13333879fe0c6
Author: Dave Andreoli <d...@gurumeditation.it>
Date:   Thu May 12 20:44:12 2016 +0200

    retain compatibility with efl 1.17
---
 src/e_mod_edgar.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/e_mod_edgar.c b/src/e_mod_edgar.c
index 67be2c8..6baf5a1 100644
--- a/src/e_mod_edgar.c
+++ b/src/e_mod_edgar.c
@@ -353,20 +353,28 @@ edgar_theme_object_set(Edgar_Py_Gadget *gadget, 
Evas_Object *obj, const char *gr
    return EINA_FALSE;
 }
 
+#ifdef EFL_VERSION_1_18
 static Eina_Bool
 edgar_popup_del_cb(void *data, const Eo_Event *event)
 {
+   Eo *obj = event->obj;
+#else
+static Eina_Bool
+edgar_popup_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void 
*event_info)
+{
+#endif
+
    Edgar_Py_Gadget *gadget = data;
 
    // call the popup_destoyed() method of the gadget.
-   PyObject *pyobj = object_from_instance(event->obj);
+   PyObject *pyobj = object_from_instance(obj);
    PyObject *ret = PyObject_CallMethod(gadget->instance, "popup_destroyed",
                                        "(S)", pyobj);
    PY_ON_ERROR_RETURN(!ret, EO_CALLBACK_CONTINUE, "Cannot call 
popup_destroyed()");
    Py_DECREF(pyobj);
    Py_DECREF(ret);
 
-   gadget->pops_obj = eina_list_remove(gadget->pops_obj, event->obj);
+   gadget->pops_obj = eina_list_remove(gadget->pops_obj, obj);
 
    return EO_CALLBACK_CONTINUE;
 }
@@ -386,8 +394,13 @@ 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_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget);
+#else
+   eo_do(content, eo_event_callback_priority_add(
+         EO_EV_DEL, EO_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget));
+#endif
 
    // call the popup_created() method of the gadget.
    PyObject *pyobj = object_from_instance(content);

-- 


Reply via email to