forked from enlightenment/efl
gengrid/popup: Fix wrong return type of _item_del_pre_hook.
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
This commit is contained in:
parent
2a341295de
commit
22d1ef2574
|
@ -779,7 +779,7 @@ _item_disable_hook(Elm_Object_Item *item)
|
|||
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;
|
||||
|
@ -795,6 +795,7 @@ _item_del_pre_hook(Elm_Object_Item *item)
|
|||
sd->items = NULL;
|
||||
_list_del(sd);
|
||||
}
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -3275,7 +3275,7 @@ _item_disable_hook(Elm_Object_Item *item)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static Eina_Bool
|
||||
_item_del_pre_hook(Elm_Object_Item *item)
|
||||
{
|
||||
Elm_Gen_Item *it = (Elm_Gen_Item *)item;
|
||||
|
@ -3283,10 +3283,11 @@ _item_del_pre_hook(Elm_Object_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 *
|
||||
|
|
Loading…
Reference in New Issue