summaryrefslogtreecommitdiff
path: root/src/examples/gengrid_example.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-06-26 10:54:58 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-06-26 10:54:58 +0900
commit0bca050c5b9226b75948a52422b4777ac1071d0b (patch)
tree17338654e088c34fa9f6a07249e8215fcb092dc1 /src/examples/gengrid_example.c
parent716a0ed6005a8f6128a176d45acb9af19055143d (diff)
src/examples: use delete,request callback only when it's really needed. this can be covered by elm_policy_set and elm_win_autodel_set easily.
Diffstat (limited to 'src/examples/gengrid_example.c')
-rw-r--r--src/examples/gengrid_example.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/examples/gengrid_example.c b/src/examples/gengrid_example.c
index f16db9762..ab8d64ee9 100644
--- a/src/examples/gengrid_example.c
+++ b/src/examples/gengrid_example.c
@@ -32,14 +32,6 @@ static const char *imgs[9] =
32static Elm_Gengrid_Item_Class *gic = NULL; 32static Elm_Gengrid_Item_Class *gic = NULL;
33static Evas_Object *before_bt, *after_bt; 33static Evas_Object *before_bt, *after_bt;
34 34
35static void
36_on_done(void *data,
37 Evas_Object *obj,
38 void *event_info)
39{
40 elm_exit();
41}
42
43/* change layouting mode */ 35/* change layouting mode */
44static void 36static void
45_horizontal_grid(void *data, 37_horizontal_grid(void *data,
@@ -430,10 +422,12 @@ elm_main(int argc,
430 422
431 srand(time(NULL)); 423 srand(time(NULL));
432 424
425 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
433 elm_app_info_set(elm_main, "elementary", "images"); 426 elm_app_info_set(elm_main, "elementary", "images");
427
434 win = elm_win_add(NULL, "gengrid", ELM_WIN_BASIC); 428 win = elm_win_add(NULL, "gengrid", ELM_WIN_BASIC);
435 elm_win_title_set(win, "Generic Grid Example"); 429 elm_win_title_set(win, "Generic Grid Example");
436 evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); 430 elm_win_autodel_set(win, EINA_TRUE);
437 431
438 bg = elm_bg_add(win); 432 bg = elm_bg_add(win);
439 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 433 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);