diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2016-06-02 12:47:54 -0700 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2016-06-02 12:47:54 -0700 |
commit | 87e653239fbe2740eaff51f3fae6139753c67827 (patch) | |
tree | 20ab8eb4c0eb9cd5f0edd9478af9e9967c913cd0 | |
parent | c77856456ecc1a6ae2953f926c97b5959f70f20f (diff) | |
download | efl-87e653239fbe2740eaff51f3fae6139753c67827.tar.gz |
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.
-rw-r--r-- | src/lib/elementary/elm_widget.c | 17 | ||||
-rw-r--r-- | src/lib/elementary/elm_widget.eo | 1 | ||||
-rw-r--r-- | src/lib/elementary/elm_widget.h | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index d42d26ca06..206dfe3e78 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -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" diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index db604a5d7e..ccf3799bdd 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -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; diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h index b0544a520f..aa8b2104f9 100644 --- a/src/lib/elementary/elm_widget.h +++ b/src/lib/elementary/elm_widget.h @@ -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; /** |