forked from enlightenment/efl
elementary: make eo_provider_find lookup in both eo and elementary parent hierarchy.
We can not assume that the elementary parent will be also somewhere in the eo parent hierarchy. We need to explore both when doing an eo_provider_find in elementary for it to be really useful.
This commit is contained in:
parent
c77856456e
commit
87e653239f
|
@ -6029,5 +6029,22 @@ _elm_widget_item_elm_interface_atspi_component_alpha_get(Eo *obj EINA_UNUSED, El
|
|||
return (double)alpha / 255.0;
|
||||
}
|
||||
|
||||
EOLIAN static Eo_Base *
|
||||
_elm_widget_eo_base_provider_find(Eo *obj, Elm_Widget_Smart_Data *pd, const Eo_Base *klass)
|
||||
{
|
||||
Eo_Base *lookup = NULL;
|
||||
|
||||
if (pd->provider_lookup) return NULL;
|
||||
pd->provider_lookup = EINA_TRUE;
|
||||
|
||||
lookup = eo_provider_find(pd->parent_obj, klass);
|
||||
if (!lookup) lookup = eo_provider_find(eo_super(obj, MY_CLASS), klass);
|
||||
|
||||
pd->provider_lookup = EINA_FALSE;
|
||||
|
||||
return lookup;
|
||||
}
|
||||
|
||||
|
||||
#include "elm_widget_item.eo.c"
|
||||
#include "elm_widget.eo.c"
|
||||
|
|
|
@ -850,6 +850,7 @@ abstract Elm.Widget (Evas.Object.Smart, Elm.Interface.Atspi_Accessible, Elm.Inte
|
|||
Eo.Base.constructor;
|
||||
Eo.Base.destructor;
|
||||
Eo.Base.dbg_info_get;
|
||||
Eo.Base.provider_find;
|
||||
Evas.Object.Smart.hide;
|
||||
Evas.Object.Smart.calculate;
|
||||
Evas.Object.Smart.clip_unset;
|
||||
|
|
|
@ -454,6 +454,7 @@ typedef struct _Elm_Widget_Smart_Data
|
|||
Eina_Bool on_translate : 1; /**< This is true when any types of elm translate function is being called. */
|
||||
Eina_Bool on_create : 1; /**< This is true when the widget is on creation(general widget constructor). */
|
||||
Eina_Bool on_destroy: 1; /**< This is true when the widget is on destruction(general widget destructor). */
|
||||
Eina_Bool provider_lookup : 1; /**< This is true when eo_provider_find is currently walking the tree */
|
||||
} Elm_Widget_Smart_Data;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue