wd->items = NULL;
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Widget_Data *wd;
Elm_Ctxpopup_Item *ctxpopup_it = (Elm_Ctxpopup_Item *) it;
wd = elm_widget_data_get(WIDGET(ctxpopup_it));
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
if (ctxpopup_it->icon)
evas_object_del(ctxpopup_it->icon);
if (eina_list_count(wd->items) < 1)
{
evas_object_hide(WIDGET(ctxpopup_it));
- return;
+ return EINA_TRUE;
}
if (wd->visible)
_sizing_eval(WIDGET(ctxpopup_it));
+
+ return EINA_TRUE;
}
EAPI Evas_Object *
static Evas_Object * _title_content_unset(Elm_Naviframe_Item *it,
const char *part);
static void _item_del(Elm_Naviframe_Item *it);
+static Eina_Bool _item_del_pre_hook(Elm_Object_Item *it);
static void _pushed_finished(void *data,
Evas_Object *obj,
const char *emission,
}
eina_stringshare_del(it->style);
+}
+
+static Eina_Bool
+_item_del_pre_hook(Elm_Object_Item *it)
+{
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
+ Elm_Naviframe_Item *navi_it;
+ Widget_Data *wd;
+
+ navi_it =(Elm_Naviframe_Item *) it;
+ wd = elm_widget_data_get(WIDGET(navi_it));
+ if (!wd) return EINA_FALSE;
+
+ if (it == elm_naviframe_top_item_get(WIDGET(navi_it)))
+ {
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
+ _item_del(navi_it);
+ elm_widget_item_free(navi_it);
+ //If the item is only one, the stack will be empty
+ if (!wd->stack) return EINA_TRUE;
+ navi_it = EINA_INLIST_CONTAINER_GET(wd->stack->last,
+ Elm_Naviframe_Item);
+ evas_object_show(VIEW(navi_it));
+ evas_object_raise(VIEW(navi_it));
+ elm_object_signal_emit(VIEW(navi_it), "elm,state,visible", "elm");
+ }
+ else
+ {
+ wd->stack = eina_inlist_remove(wd->stack, EINA_INLIST_GET(navi_it));
+ _item_del(navi_it);
+ elm_widget_item_free(navi_it);
+ }
- elm_widget_item_del(it);
+ return EINA_TRUE;
}
static void
return EINA_FALSE;
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Elm_Diskselector_Item *item, *item2, *dit;
Eina_List *l;
int i = 0;
Widget_Data *wd;
item = (Elm_Diskselector_Item *) it;
wd = elm_widget_data_get(WIDGET(item));
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
elm_box_unpack(wd->main_box, VIEW(item));
wd->check_idler = ecore_idle_enterer_before_add(_check_string, wd);
_sizing_eval(wd->self);
+ return EINA_TRUE;
}
static Elm_Diskselector_Item *
static void _callbacks_set(Evas_Object *obj);
static void _flip_up(Widget_Data *wd);
static void _flip_down(Widget_Data *wd);
-static void _item_del_pre_hook(Elm_Object_Item *it);
+static Eina_Bool _item_del_pre_hook(Elm_Object_Item *it);
static const char SIG_SELECTED[] = "selected";
static const char SIG_UNDERFLOWED[] = "underflowed";
"", _signal_val_change_stop, obj);
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Widget_Data *wd;
Elm_Flipselector_Item *item, *item2;
Eina_List *l;
item = (Elm_Flipselector_Item *) it;
wd = elm_widget_data_get(WIDGET(item));
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
if (wd->walking > 0)
{
item->deleted = EINA_TRUE;
- return;
+ return EINA_FALSE;
}
_flipselector_walk(wd);
eina_stringshare_del(item->label);
_sentinel_eval(wd);
_flipselector_unwalk(wd);
+
+ return EINA_TRUE;
}
EAPI Evas_Object *
evas_object_size_hint_max_set(obj, maxw, maxh);
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Widget_Data *wd = elm_widget_data_get(WIDGET(it));
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
_item_free((Elm_Index_Item *) it);
_index_box_clear(WIDGET(it), wd->bx[wd->level], wd->level);
+ return EINA_TRUE;
}
static Elm_Index_Item *
return ECORE_CALLBACK_CANCEL;
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Elm_Slideshow_Item *item = (Elm_Slideshow_Item *) it;
Widget_Data *wd = elm_widget_data_get(WIDGET(item));
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
+
if (wd->previous == item) wd->previous = NULL;
if (wd->current == item)
{
if ((VIEW(item)) && (item->itc->func.del))
item->itc->func.del(elm_widget_item_data_get(item), VIEW(item));
+
+ return EINA_TRUE;
}
EAPI Evas_Object *
return NULL;
}
-static void
+static Eina_Bool
_item_del_pre_hook(Elm_Object_Item *it)
{
- ELM_OBJ_ITEM_CHECK_OR_RETURN(it);
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, EINA_FALSE);
Widget_Data *wd;
Evas_Object *obj2;
item = (Elm_Toolbar_Item *) it;
wd = elm_widget_data_get(WIDGET(item));
- if (!wd) return;
+ if (!wd) return EINA_FALSE;
+
obj2 = WIDGET(item);
next = ELM_TOOLBAR_ITEM_FROM_INLIST(EINA_INLIST_GET(item)->next);
wd->items = eina_inlist_remove(wd->items, EINA_INLIST_GET(item));
if (wd->always_select && item->selected && next) _item_select(next);
_item_del(item);
_theme_hook(obj2);
+
+ return EINA_TRUE;
}
static Elm_Toolbar_Item *
{
ELM_WIDGET_ITEM_CHECK_OR_RETURN(item);
- //Widget delete callback
+ //Widget item delete callback
if (item->del_pre_func)
- item->del_pre_func((Elm_Object_Item *) item);
-
- _elm_widget_item_free(item);
+ {
+ if (item->del_pre_func((Elm_Object_Item *) item))
+ _elm_widget_item_free(item);
+ }
}
/**
typedef Evas_Object *(*Elm_Widget_Content_Unset_Cb)(const void *data, const char *part);
typedef void (*Elm_Widget_Signal_Emit_Cb)(void *data, const char *emission, const char *source);
typedef void (*Elm_Widget_Disable_Cb)(void *data);
-typedef void (*Elm_Widget_Del_Pre_Cb)(void *data);
+typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data);
#define ELM_ACCESS_TYPE 0 // when reading out widget or item this is read first
#define ELM_ACCESS_INFO 1 // next read is info - this is normally label