From 7f1e65c3d910a32e75392a0b18a6221fa3c664fa Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Mon, 12 Sep 2011 09:22:36 +0000 Subject: [PATCH] elementary/ctxpopup - minor changes. used elm_widget_item_del. and should be hidden when list is empty SVN revision: 63345 --- legacy/elementary/src/lib/elc_ctxpopup.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/legacy/elementary/src/lib/elc_ctxpopup.c b/legacy/elementary/src/lib/elc_ctxpopup.c index ced17847f3..ac144ae9d7 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.c +++ b/legacy/elementary/src/lib/elc_ctxpopup.c @@ -1351,15 +1351,19 @@ elm_ctxpopup_item_del(Elm_Object_Item *it) wd->items = eina_list_remove(wd->items, ctxpopup_it); - if (eina_list_count(wd->items) < 1) - wd->items = NULL; - wd->dir = ELM_CTXPOPUP_DIRECTION_DONT_KNOW; + elm_widget_item_del(ctxpopup_it); + + if (eina_list_count(wd->items) < 1) + { + evas_object_hide(ctxpopup_it->base.widget); + return; + } + if (wd->visible) _sizing_eval(ctxpopup_it->base.widget); - free(ctxpopup_it); } EAPI void