Fix for recent eo changes

ifdef going crazy... #FollowTheWhiteRabbit (tm)
This commit is contained in:
Davide Andreoli 2016-10-14 21:48:38 +02:00
parent 2462795896
commit 10cf94460f
1 changed files with 20 additions and 8 deletions

View File

@ -344,24 +344,33 @@ edgar_theme_object_set(Edgar_Py_Gadget *gadget, Evas_Object *obj, const char *gr
if (!gadget->edjefile)
return EINA_FALSE;
#ifdef EFL_VERSION_1_19
if (efl_isa(obj, EDJE_OBJECT_CLASS))
#else
if (eo_isa(obj, EDJE_OBJECT_CLASS))
#endif
return edje_object_file_set(obj, gadget->edjefile, buf);
#ifdef EFL_VERSION_1_19
if (efl_isa(obj, ELM_LAYOUT_CLASS))
#else
if (eo_isa(obj, ELM_LAYOUT_CLASS))
#endif
return elm_layout_file_set(obj, gadget->edjefile, buf);
return EINA_FALSE;
}
#ifdef EFL_VERSION_1_18
static void
edgar_popup_del_cb(void *data, const Eo_Event *event)
{
Eo *obj = event->object;
#if defined EFL_VERSION_1_19
static void edgar_popup_del_cb(void *data, const Efl_Event *event)
#elif defined EFL_VERSION_1_18
static void edgar_popup_del_cb(void *data, const Eo_Event *event)
#else
static Eina_Bool
edgar_popup_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
static Eina_Bool edgar_popup_del_cb(void *data, Eo *obj, const Eo_Event_Description *desc, void *event_info)
#endif
{
#ifdef EFL_VERSION_1_18
Eo *obj = event->object;
#endif
Edgar_Py_Gadget *gadget = data;
@ -400,7 +409,10 @@ 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
#if defined EFL_VERSION_1_19
efl_event_callback_priority_add(content, EFL_EVENT_DEL,
EFL_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget);
#elif defined EFL_VERSION_1_18
eo_event_callback_priority_add(content, EO_EVENT_DEL,
EO_CALLBACK_PRIORITY_BEFORE, edgar_popup_del_cb, gadget);
#else