Summary:
elm_widget calls _item_del_pre_hook of each widget and widget can
decide item deletion by return type. But gengrid and popup widget implemented
those _item_del_pre_hook function as a void type.
So this commit fixs the return types to Eina_Bool and changes gengrid widget to return EINA_FALSE when
the item wants to be deleted later.
And when the item wants to be deleted directly, it returns EINA_TRUE.
@fix
Test Plan: test in demo.
Reviewers: seoz, raster, bluezery
Subscribers: Hermet, jaehwan
Differential Revision: https://phab.enlightenment.org/D872
elm_layout_signal_emit(VIEW(it), "elm,state,item,enabled", "elm");
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *item)
{
Elm_Popup_Item *it = (Elm_Popup_Item *)item;
sd->items = NULL;
_list_del(sd);
}
+ return EINA_TRUE;
}
static void
}
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *item)
{
Elm_Gen_Item *it = (Elm_Gen_Item *)item;
if (it->walking > 0)
{
_elm_gengrid_item_del_not_serious(it);
- return;
+ return EINA_FALSE;
}
_item_del(it);
+ return EINA_TRUE;
}
static Evas_Object *