diff options
author | Daniel Juyung Seo <seojuyung2@gmail.com> | 2013-06-26 10:54:58 +0900 |
---|---|---|
committer | Daniel Juyung Seo <seojuyung2@gmail.com> | 2013-06-26 10:54:58 +0900 |
commit | 0bca050c5b9226b75948a52422b4777ac1071d0b (patch) | |
tree | 17338654e088c34fa9f6a07249e8215fcb092dc1 /src/examples/index_example_01.c | |
parent | 716a0ed6005a8f6128a176d45acb9af19055143d (diff) | |
download | elementary-0bca050c5b9226b75948a52422b4777ac1071d0b.tar.gz |
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/index_example_01.c')
-rw-r--r-- | src/examples/index_example_01.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/examples/index_example_01.c b/src/examples/index_example_01.c index cb469d0df..43da2a0a3 100644 --- a/src/examples/index_example_01.c +++ b/src/examples/index_example_01.c @@ -95,14 +95,6 @@ _index_selected(void *data, "FAIL, something went wrong"); } -static void -_on_done(void *data, - Evas_Object *obj, - void *event_info) -{ - elm_exit(); -} - EAPI_MAIN int elm_main(int argc, char **argv) @@ -112,9 +104,11 @@ elm_main(int argc, unsigned int i; char curr = 0; + elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); + win = elm_win_add(NULL, "index", ELM_WIN_BASIC); elm_win_title_set(win, "Index Example"); - evas_object_smart_callback_add(win, "delete,request", _on_done, NULL); + elm_win_autodel_set(win, EINA_TRUE); bg = elm_bg_add(win); elm_win_resize_object_add(win, bg); |