summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-28 19:58:54 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-28 19:59:39 +0900
commit98aeb437590c3838f53770ff7553b2b1a29c0281 (patch)
tree6e600569124d79f5c18f93eb7431222b9b85fd58 /src/examples
parent8c24b5a87b100253f4fbf759e8df9a792addf7ac (diff)
track_example_01.c: internal refactoring of track example code.
- removed unnecessary box. - fixed a typo of gcc build command.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/track_example_01.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/examples/track_example_01.c b/src/examples/track_example_01.c
index 3eab308db..940cca4a3 100644
--- a/src/examples/track_example_01.c
+++ b/src/examples/track_example_01.c
@@ -5,7 +5,7 @@
5 * See stdout/stderr for output. Compile with: 5 * See stdout/stderr for output. Compile with:
6 * 6 *
7 * @verbatim 7 * @verbatim
8 * gcc -g track_example_01.c -o list_example_01 `pkg-config --cflags --libs elementary` 8 * gcc -g track_example_01.c -o track_example_01 `pkg-config --cflags --libs elementary`
9 * @endverbatim 9 * @endverbatim
10 */ 10 */
11 11
@@ -30,7 +30,7 @@ item_select_cb(void *data, Evas_Object *obj, void *event_info)
30EAPI_MAIN int 30EAPI_MAIN int
31elm_main(int argc, char **argv) 31elm_main(int argc, char **argv)
32{ 32{
33 Evas_Object *win, *bx, *li; 33 Evas_Object *win, *li;
34 unsigned int i; 34 unsigned int i;
35 static const char *lbl[] = 35 static const char *lbl[] =
36 { 36 {
@@ -45,27 +45,21 @@ elm_main(int argc, char **argv)
45 45
46 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 46 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
47 47
48 win = elm_win_util_standard_add("list", "List Example"); 48 win = elm_win_util_standard_add("track-example", "Track Example");
49 elm_win_autodel_set(win, EINA_TRUE); 49 elm_win_autodel_set(win, EINA_TRUE);
50 50 evas_object_resize(win, 320, 240);
51 bx = elm_box_add(win); 51 evas_object_show(win);
52 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
53 elm_win_resize_object_add(win, bx);
54 evas_object_show(bx);
55 52
56 li = elm_list_add(win); 53 li = elm_list_add(win);
57 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 54 evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
58 evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL); 55 elm_win_resize_object_add(win, li);
59 elm_box_pack_end(bx, li); 56
60 for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++) 57 for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
61 elm_list_item_append(li, lbl[i], NULL, NULL, item_select_cb, NULL); 58 elm_list_item_append(li, lbl[i], NULL, NULL, item_select_cb, NULL);
62 59
63 evas_object_show(li); 60 evas_object_show(li);
64 elm_list_go(li); 61 elm_list_go(li);
65 62
66 evas_object_resize(win, 320, 240);
67 evas_object_show(win);
68
69 elm_run(); 63 elm_run();
70 elm_shutdown(); 64 elm_shutdown();
71 65