seoz pushed a commit to branch master.

commit 97433084fd1d8de39a753e1b5f0279e7f1b8c553
Author: Daniel Juyung Seo <[email protected]>
Date:   Fri Mar 8 03:16:55 2013 +0900

    elm bg_example_01.c: simplified example.
---
 src/examples/bg_example_01.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/examples/bg_example_01.c b/src/examples/bg_example_01.c
index 8e4453f..92125be 100644
--- a/src/examples/bg_example_01.c
+++ b/src/examples/bg_example_01.c
@@ -3,29 +3,15 @@
 
 #include <Elementary.h>
 
-static void
-on_done(void *data, Evas_Object *obj, void *event_info)
-{
-   /* quit the mainloop (elm_run) */
-   elm_exit();
-}
-
 EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
    Evas_Object *win, *bg;
 
-   win = elm_win_add(NULL, "bg-plain", ELM_WIN_BASIC);
-   elm_win_title_set(win, "Bg Plain");
-   evas_object_smart_callback_add(win, "delete,request", on_done, NULL);
+   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+   win = elm_win_util_standard_add("bg-plain", "Bg Plain");
    elm_win_autodel_set(win, EINA_TRUE);
 
-   bg = elm_bg_add(win);
-   /* allow bg to expand in x & y */
-   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   elm_win_resize_object_add(win, bg);
-   evas_object_show(bg);
-
    /* and now just resize the window to a size you want. normally widgets
     * will determine the initial size though */
    evas_object_resize(win, 320, 320);

-- 

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev

Reply via email to