widget: Avoid ERR in elm_object_content_ APIs

If content_part_{set,get,unset} are called on a widget that
is not a layout (or flip, and a few others), then some ERR
messages would be printed out.

We hide these ERR messages as all elm_object APIs should be
callable on an object for which elm_object_widget_check()
returns true.

Ref T5629
This commit is contained in:
Jean-Philippe Andre 2017-06-29 19:09:27 +09:00
parent 1ae77d0925
commit 9452a4ac49
1 changed files with 3 additions and 0 deletions

View File

@ -3954,6 +3954,7 @@ elm_widget_content_part_set(Evas_Object *obj,
Evas_Object *content)
{
ELM_WIDGET_CHECK(obj);
if (!efl_isa(obj, EFL_PART_INTERFACE)) return;
efl_content_set(efl_part(obj, part), content);
}
@ -3962,6 +3963,7 @@ elm_widget_content_part_get(const Evas_Object *obj,
const char *part)
{
ELM_WIDGET_CHECK(obj) NULL;
if (!efl_isa(obj, EFL_PART_INTERFACE)) return NULL;
return efl_content_get(efl_part(obj, part));
}
@ -3970,6 +3972,7 @@ elm_widget_content_part_unset(Evas_Object *obj,
const char *part)
{
ELM_WIDGET_CHECK(obj) NULL;
if (!efl_isa(obj, EFL_PART_INTERFACE)) return NULL;
return efl_content_unset(efl_part(obj, part));
}