aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_transit.c
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-08-25 10:01:59 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-08-25 10:01:59 +0000
commita0366f0ef1209bb575d01ac439463c456a9776da (patch)
tree6087a6862a891832178625fcef9404011e510c48 /legacy/elementary/src/bin/test_transit.c
parentFrom: Jaehwan Kim <jae.hwan.kim@samsung.com> (diff)
downloadefl-a0366f0ef1209bb575d01ac439463c456a9776da.tar.gz
From: Jérémy Zurcher <jeremy@asynk.ch>
Subject: [E-devel] patch : eina_prefix + elementary_test please find attached a small patch for eina_prefix it prevent segfault when for instance no elm_app_compile_*_dir_set is called prior to elm_app_info_set and another one for elementary/src/bin/test*.c which tends to replace usage of PACKAGE_DATA_DIR with elm_app_data_dir_get SVN revision: 62796
Diffstat (limited to 'legacy/elementary/src/bin/test_transit.c')
-rw-r--r--legacy/elementary/src/bin/test_transit.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/legacy/elementary/src/bin/test_transit.c b/legacy/elementary/src/bin/test_transit.c
index 932f1dddeb..e1ddc399f2 100644
--- a/legacy/elementary/src/bin/test_transit.c
+++ b/legacy/elementary/src/bin/test_transit.c
@@ -113,16 +113,16 @@ _transit_image_animation(void *data, Evas_Object *obj __UNUSED__, void *event_in
Elm_Transit *trans;
Evas_Object *ic = data;
- snprintf(buf, sizeof(buf), "%s/images/icon_19.png", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/icon_19.png", elm_app_data_dir_get());
images = eina_list_append(images, eina_stringshare_add(buf));
- snprintf(buf, sizeof(buf), "%s/images/icon_00.png", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/icon_00.png", elm_app_data_dir_get());
images = eina_list_append(images, eina_stringshare_add(buf));
- snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/icon_11.png", elm_app_data_dir_get());
images = eina_list_append(images, eina_stringshare_add(buf));
- snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
images = eina_list_append(images, eina_stringshare_add(buf));
trans = elm_transit_add();
@@ -249,7 +249,7 @@ test_transit(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
evas_object_show(bx);
ic = elm_icon_add(win);
- snprintf(buf, sizeof(buf), "%s/images/icon_11.png", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/icon_11.png", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
@@ -368,6 +368,7 @@ void
test_transit5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *bt, *bt2, *ic;
+ char buf[PATH_MAX];
win = elm_win_add(NULL, "transit5", ELM_WIN_BASIC);
elm_win_title_set(win, "Transit 5");
@@ -380,7 +381,8 @@ test_transit5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
evas_object_show(bg);
ic = elm_icon_add(win);
- elm_icon_file_set(ic, PACKAGE_DATA_DIR"/images/rock_01.jpg", NULL);
+ snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
+ elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_max_set(ic, 50, 50);
bt = elm_button_add(win);
@@ -391,7 +393,8 @@ test_transit5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
evas_object_show(bt);
ic = elm_icon_add(win);
- elm_icon_file_set(ic, PACKAGE_DATA_DIR"/images/rock_02.jpg", NULL);
+ snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
+ elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_max_set(ic, 50, 50);
bt2 = elm_button_add(win);
@@ -411,6 +414,7 @@ void
test_transit6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *bt, *bt2, *ic;
+ char buf[PATH_MAX];
win = elm_win_add(NULL, "transit6", ELM_WIN_BASIC);
elm_win_title_set(win, "Transit 6");
@@ -423,7 +427,8 @@ test_transit6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
evas_object_show(bg);
ic = elm_icon_add(win);
- elm_icon_file_set(ic, PACKAGE_DATA_DIR"/images/rock_01.jpg", NULL);
+ snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
+ elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_max_set(ic, 50, 50);
bt = elm_button_add(win);
@@ -434,7 +439,8 @@ test_transit6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
evas_object_show(bt);
ic = elm_icon_add(win);
- elm_icon_file_set(ic, PACKAGE_DATA_DIR"/images/rock_02.jpg", NULL);
+ snprintf(buf, sizeof(buf), "%s/images/rock_02.jpg", elm_app_data_dir_get());
+ elm_icon_file_set(ic, buf, NULL);
evas_object_size_hint_max_set(ic, 50, 50);
bt2 = elm_button_add(win);