summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelle legrand <michelle.legrand@openwide.fr>2015-02-11 14:43:15 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-26 18:11:01 +0100
commitc8ca1ad1b3390c9bf6712b616f971d814c63c274 (patch)
tree8c5b586116e7186393be080cd2212aca9093b03c
parentf477c0ffeafd03cad7a684f07b187dde9ff01e25 (diff)
elm_slideshow: looking for right data directory in prefix.
Summary: Get right application prefix by using elm_app_data_dir_get() for the slideshow images. @fix Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/bin/test_slideshow.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/src/bin/test_slideshow.c b/src/bin/test_slideshow.c
index 8da3aff0f..0414ef22a 100644
--- a/src/bin/test_slideshow.c
+++ b/src/bin/test_slideshow.c
@@ -3,15 +3,6 @@
3 3
4static Evas_Object *slideshow, *bt_start, *bt_stop; 4static Evas_Object *slideshow, *bt_start, *bt_stop;
5static Elm_Slideshow_Item_Class itc; 5static Elm_Slideshow_Item_Class itc;
6static const char *img1 = PACKAGE_DATA_DIR"/images/logo.png";
7static const char *img2 = PACKAGE_DATA_DIR"/images/plant_01.jpg";
8static const char *img3 = PACKAGE_DATA_DIR"/images/rock_01.jpg";
9static const char *img4 = PACKAGE_DATA_DIR"/images/rock_02.jpg";
10static const char *img5 = PACKAGE_DATA_DIR"/images/sky_01.jpg";
11static const char *img6 = PACKAGE_DATA_DIR"/images/sky_04.jpg";
12static const char *img7 = PACKAGE_DATA_DIR"/images/wood_01.jpg";
13static const char *img8 = PACKAGE_DATA_DIR"/images/mystrale.jpg";
14static const char *img9 = PACKAGE_DATA_DIR"/images/mystrale_2.jpg";
15 6
16static void 7static void
17_notify_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 8_notify_show(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
@@ -112,6 +103,26 @@ test_slideshow(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
112 const char *transition, *layout; 103 const char *transition, *layout;
113 Elm_Object_Item *slide_last_it; 104 Elm_Object_Item *slide_last_it;
114 105
106 char img1[PATH_MAX];
107 char img2[PATH_MAX];
108 char img3[PATH_MAX];
109 char img4[PATH_MAX];
110 char img5[PATH_MAX];
111 char img6[PATH_MAX];
112 char img7[PATH_MAX];
113 char img8[PATH_MAX];
114 char img9[PATH_MAX];
115
116 snprintf(img1, sizeof(img1), "%s/images/logo.png", elm_app_data_dir_get());
117 snprintf(img2, sizeof(img2), "%s/images/plant_01.jpg", elm_app_data_dir_get());
118 snprintf(img3, sizeof(img3), "%s/images/rock_01.jpg", elm_app_data_dir_get());
119 snprintf(img4, sizeof(img4), "%s/images/rock_02.png", elm_app_data_dir_get());
120 snprintf(img5, sizeof(img5), "%s/images/sky_01.png", elm_app_data_dir_get());
121 snprintf(img6, sizeof(img6), "%s/images/sky_04.png", elm_app_data_dir_get());
122 snprintf(img7, sizeof(img7), "%s/images/wood_01.png", elm_app_data_dir_get());
123 snprintf(img8, sizeof(img8), "%s/images/mystrale.png", elm_app_data_dir_get());
124 snprintf(img9, sizeof(img9), "%s/images/mystrale_2.png", elm_app_data_dir_get());
125
115 win = elm_win_util_standard_add("slideshow", "Slideshow"); 126 win = elm_win_util_standard_add("slideshow", "Slideshow");
116 elm_win_autodel_set(win, EINA_TRUE); 127 elm_win_autodel_set(win, EINA_TRUE);
117 128