summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung@gmail.com>2013-06-18 04:33:24 +0900
committerDaniel Juyung Seo <seojuyung@gmail.com>2013-06-18 04:33:24 +0900
commit19217a89367e1800735244dce2e73573d4d87ed6 (patch)
tree20b9abb7aa0f2a024ad82f268ce33b23cf505bed
parente2e5a9725d97cdead3719ea7bb5d4d03f6e4c956 (diff)
main.c: use elm_layout_content_set + refactoring.
-rw-r--r--source/3-final/src/main.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/source/3-final/src/main.c b/source/3-final/src/main.c
index fe9bc16..d114ccb 100644
--- a/source/3-final/src/main.c
+++ b/source/3-final/src/main.c
@@ -70,7 +70,7 @@ create_top_contents(Evas_Object *layout)
70 elm_table_pack(table, label, i, 1, 1, 1); 70 elm_table_pack(table, label, i, 1, 1, 1);
71 } 71 }
72 72
73 elm_object_part_content_set(layout, "elm.swallow.top", table); 73 elm_layout_content_set(layout, "elm.swallow.top", table);
74 evas_object_show(table); 74 evas_object_show(table);
75 75
76} 76}
@@ -105,7 +105,7 @@ create_middle_contents(Evas_Object *layout)
105 } 105 }
106 } 106 }
107 107
108 elm_object_part_content_set(layout, "elm.swallow.middle", table); 108 elm_layout_content_set(layout, "elm.swallow.middle", table);
109 evas_object_show(table); 109 evas_object_show(table);
110} 110}
111 111
@@ -120,7 +120,7 @@ create_arrows(Evas_Object *layout)
120 snprintf(buf, sizeof(buf), "%s/edj/layout.edj", elm_app_data_dir_get()); 120 snprintf(buf, sizeof(buf), "%s/edj/layout.edj", elm_app_data_dir_get());
121 img = create_image(btn, buf, "left_arrow"); 121 img = create_image(btn, buf, "left_arrow");
122 elm_object_content_set(btn, img); 122 elm_object_content_set(btn, img);
123 elm_object_part_content_set(layout, "elm.swallow.left_arrow", btn); 123 elm_layout_content_set(layout, "elm.swallow.left_arrow", btn);
124 evas_object_show(btn); 124 evas_object_show(btn);
125 evas_object_smart_callback_add(btn, "clicked", _left_arrow_clicked_cb, layout); 125 evas_object_smart_callback_add(btn, "clicked", _left_arrow_clicked_cb, layout);
126 126
@@ -129,7 +129,7 @@ create_arrows(Evas_Object *layout)
129 snprintf(buf, sizeof(buf), "%s/edj/layout.edj", elm_app_data_dir_get()); 129 snprintf(buf, sizeof(buf), "%s/edj/layout.edj", elm_app_data_dir_get());
130 img = create_image(btn, buf, "right_arrow"); 130 img = create_image(btn, buf, "right_arrow");
131 elm_object_content_set(btn, img); 131 elm_object_content_set(btn, img);
132 elm_object_part_content_set(layout, "elm.swallow.right_arrow", btn); 132 elm_layout_content_set(layout, "elm.swallow.right_arrow", btn);
133 evas_object_show(btn); 133 evas_object_show(btn);
134 evas_object_smart_callback_add(btn, "clicked", _right_arrow_clicked_cb, layout); 134 evas_object_smart_callback_add(btn, "clicked", _right_arrow_clicked_cb, layout);
135} 135}
@@ -161,7 +161,7 @@ create_bottom_contents(Evas_Object *layout)
161 elm_toolbar_item_append(toolbar, NULL, "Favorites", toolbar_it_cb, layout); 161 elm_toolbar_item_append(toolbar, NULL, "Favorites", toolbar_it_cb, layout);
162 elm_toolbar_item_append(toolbar, NULL, "YouTube", toolbar_it_cb, layout); 162 elm_toolbar_item_append(toolbar, NULL, "YouTube", toolbar_it_cb, layout);
163 163
164 elm_object_part_content_set(layout, "elm.swallow.bottom", toolbar); 164 elm_layout_content_set(layout, "elm.swallow.bottom", toolbar);
165 evas_object_show(toolbar); 165 evas_object_show(toolbar);
166} 166}
167 167
@@ -169,9 +169,6 @@ void
169init(void) 169init(void)
170{ 170{
171 Evas_Object *win = NULL, *layout = NULL; 171 Evas_Object *win = NULL, *layout = NULL;
172 Evas_Object *table = NULL, *toolbar = NULL;
173 Evas_Object *btn = NULL, *img = NULL, *label = NULL;
174 int i = 0, j = 0;
175 172
176 //Create a Window 173 //Create a Window
177 win = create_win(); 174 win = create_win();
@@ -255,7 +252,7 @@ _btn_effect(Evas_Object *obj)
255 elm_transit_duration_set(transit, 0.25); 252 elm_transit_duration_set(transit, 0.25);
256 elm_transit_auto_reverse_set(transit, EINA_TRUE); 253 elm_transit_auto_reverse_set(transit, EINA_TRUE);
257 elm_transit_effect_zoom_add(transit, 1.0, 1.25); 254 elm_transit_effect_zoom_add(transit, 1.0, 1.25);
258 //elm_transit_smooth_set(transit, EINA_FALSE); // EFL 1.8 255 elm_transit_smooth_set(transit, EINA_FALSE);
259 elm_transit_go(transit); 256 elm_transit_go(transit);
260} 257}
261 258