efl_ui_grid: add an error to grid

grid only accepts grid items, not general widgets. If a wrong type is
passed in, a error should be printed.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D8704
This commit is contained in:
Marcel Hollerbach 2019-04-24 19:12:15 +02:00
parent df089ac5ff
commit 91cacb5357
1 changed files with 5 additions and 1 deletions

View File

@ -954,7 +954,11 @@ _grid_item_deleted(void *data, const Efl_Event *event)
static Eina_Bool
_grid_item_process(Eo *obj, Efl_Ui_Grid_Data *pd, EINA_UNUSED Efl_Ui_Grid_Item *it)
{
EFL_UI_GRID_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
if (!efl_isa(it, EFL_UI_GRID_ITEM_CLASS))
{
ERR("Item must be of type EFL_UI_GRID_ITEM_CLASS");
return EINA_FALSE;
}
if (eina_list_data_find(pd->items, it))
{