summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-06-26 09:35:26 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-06-26 09:35:26 +0900
commit70b649757c021f22da2437749c242f66471c1b0c (patch)
treecc643992bd517c0375d36bf78774c027455d36ba /src/examples
parent1ce99e109650f39f1242176044648591e6f83488 (diff)
ctxpopup_example01.c: delete ctxpopup object when it's dismissed.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/ctxpopup_example_01.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/examples/ctxpopup_example_01.c b/src/examples/ctxpopup_example_01.c
index 7f4c75441..90e5ab706 100644
--- a/src/examples/ctxpopup_example_01.c
+++ b/src/examples/ctxpopup_example_01.c
@@ -4,6 +4,12 @@
4#include <Elementary.h> 4#include <Elementary.h>
5 5
6static void 6static void
7_dismissed_cb(void *data, Evas_Object *obj, void *event_info)
8{
9 evas_object_del(obj);
10}
11
12static void
7_ctxpopup_item_cb(void *data, Evas_Object *obj, void *event_info) 13_ctxpopup_item_cb(void *data, Evas_Object *obj, void *event_info)
8{ 14{
9 printf("ctxpopup item selected: %s\n", elm_object_item_text_get(event_info)); 15 printf("ctxpopup item selected: %s\n", elm_object_item_text_get(event_info));
@@ -25,6 +31,7 @@ _list_item_cb(void *data, Evas_Object *obj, void *event_info)
25 Evas_Coord x,y; 31 Evas_Coord x,y;
26 32
27 ctxpopup = elm_ctxpopup_add(obj); 33 ctxpopup = elm_ctxpopup_add(obj);
34 evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed_cb, NULL);
28 35
29 item_new(ctxpopup, "Go to home folder", "home"); 36 item_new(ctxpopup, "Go to home folder", "home");
30 item_new(ctxpopup, "Save file", "file"); 37 item_new(ctxpopup, "Save file", "file");
@@ -50,6 +57,7 @@ _list_item_cb2(void *data, Evas_Object *obj, void *event_info)
50 Evas_Coord x,y; 57 Evas_Coord x,y;
51 58
52 ctxpopup = elm_ctxpopup_add(obj); 59 ctxpopup = elm_ctxpopup_add(obj);
60 evas_object_smart_callback_add(ctxpopup, "dismissed", _dismissed_cb, NULL);
53 elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE); 61 elm_ctxpopup_horizontal_set(ctxpopup, EINA_TRUE);
54 62
55 item_new(ctxpopup, NULL, "home"); 63 item_new(ctxpopup, NULL, "home");