ctxpopup_example01.c: delete ctxpopup object when it's dismissed.

This commit is contained in:
Daniel Juyung Seo 2013-06-26 09:35:26 +09:00
parent c6190fa7bb
commit eb41a56d85
1 changed files with 8 additions and 0 deletions

View File

@ -3,6 +3,12 @@
#include <Elementary.h>
static void
_dismissed_cb(void *data, Evas_Object *obj, void *event_info)
{
evas_object_del(obj);
}
static void
_ctxpopup_item_cb(void *data, Evas_Object *obj, void *event_info)
{
@ -25,6 +31,7 @@ _list_item_cb(void *data, Evas_Object *obj, void *event_info)
Evas_Coord x,y;
ctxpopup = elm_ctxpopup_add(obj);
evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed_cb, NULL);
item_new(ctxpopup, "Go to home folder", "home");
item_new(ctxpopup, "Save file", "file");
@ -50,6 +57,7 @@ _list_item_cb2(void *data, Evas_Object *obj, void *event_info)
Evas_Coord x,y;
ctxpopup = elm_ctxpopup_add(obj);
evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed_cb, NULL);
elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE);
item_new(ctxpopup, NULL, "home");