forked from enlightenment/efl
elementary: make del_pre not return a bool and force rely on Eo ref counting.
Differential Revision: https://phab.enlightenment.org/D6071
This commit is contained in:
parent
a669fb820a
commit
b265c5c887
|
@ -4103,17 +4103,14 @@ _elm_widget_item_efl_object_del(const Eo *eo_item, Elm_Widget_Item_Data *item)
|
|||
item->on_deletion = EINA_TRUE;
|
||||
|
||||
//Widget item delete callback
|
||||
Eina_Bool del_ok;
|
||||
del_ok = elm_wdg_item_del_pre(item->eo_obj);
|
||||
if (del_ok)
|
||||
efl_parent_set((Eo*)eo_item, NULL);
|
||||
elm_wdg_item_del_pre(item->eo_obj);
|
||||
efl_parent_set((Eo*)eo_item, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
EOLIAN static void
|
||||
_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item EINA_UNUSED)
|
||||
{
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -857,12 +857,12 @@ _elm_ctxpopup_item_elm_widget_item_disable(Eo *eo_ctxpopup_it,
|
|||
(ctxpopup_it->list_item, elm_wdg_item_disabled_get(eo_ctxpopup_it));
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
EOLIAN static void
|
||||
_elm_ctxpopup_item_elm_widget_item_del_pre(Eo *eo_ctxpopup_it EINA_UNUSED,
|
||||
Elm_Ctxpopup_Item_Data *ctxpopup_it)
|
||||
{
|
||||
ELM_CTXPOPUP_DATA_GET(WIDGET(ctxpopup_it), sd);
|
||||
if (!sd) return EINA_FALSE;
|
||||
if (!sd) return ;
|
||||
|
||||
if (ctxpopup_it->list_item)
|
||||
{
|
||||
|
@ -871,7 +871,7 @@ _elm_ctxpopup_item_elm_widget_item_del_pre(Eo *eo_ctxpopup_it EINA_UNUSED,
|
|||
ctxpopup_it->list_item = NULL;
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
return ;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -3766,11 +3766,10 @@ _elm_gengrid_item_elm_widget_item_disable(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *i
|
|||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
EOLIAN static void
|
||||
_elm_gengrid_item_elm_widget_item_del_pre(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it)
|
||||
{
|
||||
_item_del(it);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static Evas_Object *
|
||||
|
|
|
@ -6030,7 +6030,7 @@ _elm_genlist_item_elm_widget_item_disable(Eo *eo_it, Elm_Gen_Item *it)
|
|||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
EOLIAN static void
|
||||
_elm_genlist_item_elm_widget_item_del_pre(Eo *eo_it EINA_UNUSED,
|
||||
Elm_Gen_Item *it)
|
||||
{
|
||||
|
@ -6042,7 +6042,6 @@ _elm_genlist_item_elm_widget_item_del_pre(Eo *eo_it EINA_UNUSED,
|
|||
efl_access_children_changed_del_signal_emit(WIDGET(it),eo_it);
|
||||
|
||||
_item_del(it);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static void
|
||||
|
|
|
@ -70,7 +70,7 @@ static Eina_Bool _key_action_move(Evas_Object *obj, const char *params);
|
|||
static Eina_Bool _key_action_select(Evas_Object *obj, const char *params);
|
||||
static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params);
|
||||
|
||||
EOLIAN static Eina_Bool _elm_list_item_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_List_Item_Data *item);
|
||||
EOLIAN static void _elm_list_item_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_List_Item_Data *item);
|
||||
static const Elm_Action key_actions[] = {
|
||||
{"move", _key_action_move},
|
||||
{"select", _key_action_select},
|
||||
|
@ -2034,7 +2034,7 @@ _elm_list_item_elm_widget_item_part_text_get(const Eo *eo_it, Elm_List_Item_Data
|
|||
2. elm_widget_item_del() should be called instead of the combination of
|
||||
_elm_list_item_free() + elm_widget_item_free()
|
||||
*/
|
||||
EOLIAN static Eina_Bool
|
||||
EOLIAN static void
|
||||
_elm_list_item_elm_widget_item_del_pre(Eo *eo_item, Elm_List_Item_Data *item)
|
||||
{
|
||||
Evas_Object *obj = WIDGET(item);
|
||||
|
@ -2049,11 +2049,11 @@ _elm_list_item_elm_widget_item_del_pre(Eo *eo_item, Elm_List_Item_Data *item)
|
|||
|
||||
if (sd->walking > 0)
|
||||
{
|
||||
if (item->deleted) return EINA_FALSE;
|
||||
if (item->deleted) return ;
|
||||
item->deleted = EINA_TRUE;
|
||||
efl_ref(eo_item);
|
||||
sd->to_delete = eina_list_append(sd->to_delete, item);
|
||||
return EINA_FALSE;
|
||||
return ;
|
||||
}
|
||||
|
||||
sd->items = eina_list_remove_list(sd->items, item->node);
|
||||
|
@ -2065,8 +2065,6 @@ _elm_list_item_elm_widget_item_del_pre(Eo *eo_item, Elm_List_Item_Data *item)
|
|||
|
||||
_elm_list_unwalk(obj, sd);
|
||||
evas_object_unref(obj);
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EOLIAN static void _elm_list_item_elm_widget_item_signal_emit(Eo *eo_it EINA_UNUSED, Elm_List_Item_Data *it,
|
||||
|
|
|
@ -497,7 +497,6 @@ class Elm.Widget.Item(Efl.Object, Efl.Access.Object,
|
|||
del_pre @protected {
|
||||
[[Delete pre widget item]]
|
||||
legacy: null;
|
||||
return: bool; [[$true on success, $false otherwise]]
|
||||
}
|
||||
focus_next_object_get @const {
|
||||
[[Get the next object with specific focus direction.
|
||||
|
|
Loading…
Reference in New Issue