static void _theme_hook(Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static void _sub_del(void *data, Evas_Object *obj, void *event_info);
+static void _content_del(void *data, Evas *e, Evas_Object *obj, void *event_info);
static Eina_List *_item_get(Evas_Object *obj, Evas_Object *content);
static const char SIG_HIDE_FINISHED[] = "hide,finished";
}
static void
-_sub_del(void *data, Evas_Object *obj __UNUSED__, void *event_info)
+_content_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
Widget_Data *wd = elm_widget_data_get(data);
- Evas_Object *sub = event_info;
Eina_List *l;
Item *it;
if (!wd) return;
- l = _item_get(obj, sub);
+ l = _item_get(obj, obj);
if (!l) return;
it = l->data;
-
wd->stack = eina_list_remove_list(wd->stack, l);
evas_object_event_callback_del_full
- (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, it);
- //TODO: Since the base and content is sub object of pager,
- //this function (and _item_get) will be called unnecessary.
- //consider use EVAS_CALLBACK_DEL instead of sub_del callback
+ (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, it);
evas_object_del(it->base);
_eval_top(data);
free(it);
evas_object_del(it->base);
evas_object_event_callback_del_full
(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, it);
+ evas_object_event_callback_del(content,
+ EVAS_CALLBACK_DEL,
+ _content_del);
evas_object_del(content);
free(it);
}
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, _move, obj);
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, obj);
- evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
-
evas_object_smart_callbacks_descriptions_set(obj, _signals);
_mirrored_set(obj, elm_widget_mirrored_get(obj));
evas_object_event_callback_add(it->content,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, it);
+ evas_object_event_callback_add(it->content,
+ EVAS_CALLBACK_DEL,
+ _content_del,
+ it);
edje_object_part_swallow(it->base, "elm.swallow.content", it->content);
edje_object_size_min_calc(it->base, &it->minw, &it->minh);
evas_object_data_set(it->base, "_elm_leaveme", obj);