forked from enlightenment/efl
widget: Remove name_find from EO
This is already implemented at the Efl.Object level, under the same name: "name_find". Ref T5363
This commit is contained in:
parent
1d39c2d175
commit
876ad24815
|
@ -4246,23 +4246,23 @@ elm_widget_type_check(const Evas_Object *obj,
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_widget_name_find(const Evas_Object *obj,
|
||||
const char *name,
|
||||
int recurse)
|
||||
/** @internal */
|
||||
EAPI Evas_Object *
|
||||
elm_widget_name_find(const Eo *obj, const char *name, int recurse)
|
||||
{
|
||||
Eina_List *l;
|
||||
Evas_Object *child;
|
||||
const char *s;
|
||||
INTERNAL_ENTRY NULL;
|
||||
|
||||
if (!name) return NULL;
|
||||
if (!_elm_widget_is(obj)) return NULL;
|
||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||
{
|
||||
s = evas_object_name_get(child);
|
||||
if ((s) && (!strcmp(s, name))) return child;
|
||||
if ((recurse != 0) &&
|
||||
((child = _widget_name_find(child, name, recurse - 1))))
|
||||
((child = elm_widget_name_find(child, name, recurse - 1))))
|
||||
return child;
|
||||
}
|
||||
if (sd->hover_obj)
|
||||
|
@ -4270,19 +4270,12 @@ _widget_name_find(const Evas_Object *obj,
|
|||
s = evas_object_name_get(sd->hover_obj);
|
||||
if ((s) && (!strcmp(s, name))) return sd->hover_obj;
|
||||
if ((recurse != 0) &&
|
||||
((child = _widget_name_find(sd->hover_obj, name, recurse - 1))))
|
||||
((child = elm_widget_name_find(sd->hover_obj, name, recurse - 1))))
|
||||
return child;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
EOLIAN static Evas_Object*
|
||||
_elm_widget_name_find(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const char *name, int recurse)
|
||||
{
|
||||
if (!name) return NULL;
|
||||
return _widget_name_find(obj, name, recurse);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
|
|
|
@ -270,15 +270,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible,
|
|||
}
|
||||
}
|
||||
|
||||
/* Probably not required with eo find */
|
||||
name_find @const {
|
||||
[[Find widget by name]]
|
||||
return: Efl.Canvas.Object; [[Widget]]
|
||||
params {
|
||||
@in name: string; [[Widget name]]
|
||||
@in recurse: int; [[Depth in the tree to search for the widget]]
|
||||
}
|
||||
}
|
||||
sub_object_add {
|
||||
[['Virtual' function handling sub objects being added.]]
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
|
|
Loading…
Reference in New Issue