hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=59bca4dfabb9d5d7c2a79d8853f9ac3eac886f54

commit 59bca4dfabb9d5d7c2a79d8853f9ac3eac886f54
Author: Hermet Park <her...@hermet.pe.kr>
Date:   Mon Feb 1 22:35:23 2016 +0900

    layout: test code refactoring.
    
    remove a comment.
    pass immediate parents.
    remove unnecessary show call.
---
 src/bin/test_layout.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/bin/test_layout.c b/src/bin/test_layout.c
index 7b33cb4..fce1b93 100644
--- a/src/bin/test_layout.c
+++ b/src/bin/test_layout.c
@@ -54,7 +54,7 @@ test_layout(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
    elm_win_resize_object_add(win, box);
    evas_object_show(box);
 
-   ly = elm_layout_add(win);
+   ly = elm_layout_add(box);
 
    if (!elm_layout_theme_set(
          ly, "layout", "application", "titlebar"))
@@ -66,43 +66,39 @@ test_layout(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event_in
    elm_box_pack_end(box, ly);
    evas_object_show(ly);
 
-   bt = elm_icon_add(win);
+   bt = elm_icon_add(ly);
    elm_icon_standard_set(bt, "chat");
    evas_object_size_hint_min_set(bt, 20, 20);
    elm_layout_icon_set(ly, bt);
 
-   bt = elm_icon_add(win);
+   bt = elm_icon_add(ly);
    elm_icon_standard_set(bt, "close");
    evas_object_size_hint_min_set(bt, 20, 20);
    elm_layout_end_set(ly, bt);
 
-   ly = elm_layout_add(win);
+   ly = elm_layout_add(box);
    snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(ly, buf, "layout");
    evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_box_pack_end(box, ly);
-   //elm_win_resize_object_add(win, ly);
    evas_object_show(ly);
-   
+
    elm_layout_signal_callback_add(ly, "*", "*", _cb_signal, NULL);
 
-   bt = elm_button_add(win);
+   bt = elm_button_add(ly);
    elm_object_text_set(bt, "Button 1");
    elm_object_part_content_set(ly, "element1", bt);
    evas_object_smart_callback_add(bt, "clicked", _clicked_cb, ly);
-   evas_object_show(bt);
 
-   bt = elm_button_add(win);
+   bt = elm_button_add(ly);
    elm_object_text_set(bt, "Button 2");
    elm_object_part_content_set(ly, "element2", bt);
    evas_object_smart_callback_add(bt, "clicked", _clicked_cb, ly);
-   evas_object_show(bt);
 
-   bt = elm_button_add(win);
+   bt = elm_button_add(ly);
    elm_object_text_set(bt, "Button 3");
    elm_object_part_content_set(ly, "element3", bt);
    evas_object_smart_callback_add(bt, "clicked", _clicked_cb, ly);
-   evas_object_show(bt);
 
    elm_layout_part_cursor_set(ly, "text", ELM_CURSOR_WATCH);
 

-- 


Reply via email to