summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichelle Legrand <legrand.michelle@outlook.com>2015-03-09 10:05:33 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-26 18:18:52 +0100
commitd6d1a2d4b08b88c58abe678c42acd206585cdcd8 (patch)
treeec48c06b8e935b09e0ec23f790a8cfc1c27c84fc
parente1431180e2f9d177ddfd93e3db147c3bb6fd051d (diff)
elm_naviframe: use of elm_app_data_dir_get() instead of PACKAGE_DATA_DIR.
Summary: This allows to build binaries that will not look for the directory passed to the configure with --prefix at build but will look for data files according to where the exe has been installed. @fix Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/bin/test_naviframe_complex.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/bin/test_naviframe_complex.c b/src/bin/test_naviframe_complex.c
index 439fb05e7..3d975ccbe 100644
--- a/src/bin/test_naviframe_complex.c
+++ b/src/bin/test_naviframe_complex.c
@@ -8,14 +8,6 @@
8 elm_object_tooltip_text_set((BT), (TEXT)); \ 8 elm_object_tooltip_text_set((BT), (TEXT)); \
9 elm_object_tooltip_window_mode_set((BT), EINA_TRUE) 9 elm_object_tooltip_window_mode_set((BT), EINA_TRUE)
10 10
11static const char *img1 = PACKAGE_DATA_DIR "/images/logo.png";
12static const char *img2 = PACKAGE_DATA_DIR "/images/plant_01.jpg";
13static const char *img3 = PACKAGE_DATA_DIR "/images/rock_01.jpg";
14static const char *img4 = PACKAGE_DATA_DIR "/images/rock_02.jpg";
15static const char *img5 = PACKAGE_DATA_DIR "/images/sky_01.jpg";
16static const char *img6 = PACKAGE_DATA_DIR "/images/sky_02.jpg";
17static const char *img7 = PACKAGE_DATA_DIR "/images/sky_03.jpg";
18
19static char * 11static char *
20gl_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED) 12gl_text_get(void *data, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
21{ 13{
@@ -138,7 +130,9 @@ _page7(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
138{ 130{
139 Evas_Object *bt, *bt2, *content, *nf = data; 131 Evas_Object *bt, *bt2, *content, *nf = data;
140 Elm_Object_Item *it; 132 Elm_Object_Item *it;
133 char img6[PATH_MAX];
141 134
135 snprintf(img6, sizeof(img6), "%s/images/sky_02.png", elm_app_data_dir_get());
142 bt = elm_button_add(nf); 136 bt = elm_button_add(nf);
143 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 137 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
144 BUTTON_TEXT_SET(bt, "Page 6"); 138 BUTTON_TEXT_SET(bt, "Page 6");
@@ -160,7 +154,9 @@ _page6(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
160{ 154{
161 Evas_Object *bt, *bt2, *content, *nf = data; 155 Evas_Object *bt, *bt2, *content, *nf = data;
162 Elm_Object_Item *it; 156 Elm_Object_Item *it;
157 char img7[PATH_MAX];
163 158
159 snprintf(img7, sizeof(img7), "%s/images/sky_03.png", elm_app_data_dir_get());
164 bt = elm_button_add(nf); 160 bt = elm_button_add(nf);
165 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 161 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
166 BUTTON_TEXT_SET(bt, "Page 5"); 162 BUTTON_TEXT_SET(bt, "Page 5");
@@ -182,7 +178,9 @@ _page5(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
182{ 178{
183 Evas_Object *bt, *bt2, *content, *nf = data; 179 Evas_Object *bt, *bt2, *content, *nf = data;
184 Elm_Object_Item *it; 180 Elm_Object_Item *it;
181 char img5[PATH_MAX];
185 182
183 snprintf(img5, sizeof(img5), "%s/images/sky_01.png", elm_app_data_dir_get());
186 bt = elm_button_add(nf); 184 bt = elm_button_add(nf);
187 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 185 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
188 BUTTON_TEXT_SET(bt, "Page 4"); 186 BUTTON_TEXT_SET(bt, "Page 4");
@@ -209,8 +207,10 @@ _page4(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
209{ 207{
210 Evas_Object *bt, *ic, *content, *nf = data; 208 Evas_Object *bt, *ic, *content, *nf = data;
211 char buf[PATH_MAX]; 209 char buf[PATH_MAX];
210 char img4[PATH_MAX];
212 Elm_Object_Item *it; 211 Elm_Object_Item *it;
213 212
213 snprintf(img4, sizeof(img4), "%s/images/rock_02.png", elm_app_data_dir_get());
214 ic = elm_icon_add(nf); 214 ic = elm_icon_add(nf);
215 snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png", 215 snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png",
216 elm_app_data_dir_get()); 216 elm_app_data_dir_get());
@@ -247,8 +247,10 @@ _page3(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
247{ 247{
248 Evas_Object *bt, *bt2, *ic, *content, *nf = data; 248 Evas_Object *bt, *bt2, *ic, *content, *nf = data;
249 char buf[PATH_MAX]; 249 char buf[PATH_MAX];
250 char img3[PATH_MAX];
250 Elm_Object_Item *it; 251 Elm_Object_Item *it;
251 252
253 snprintf(img3, sizeof(img3), "%s/images/rock_01.jpg", elm_app_data_dir_get());
252 bt = elm_button_add(nf); 254 bt = elm_button_add(nf);
253 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 255 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
254 BUTTON_TEXT_SET(bt, "Prev"); 256 BUTTON_TEXT_SET(bt, "Prev");
@@ -280,8 +282,10 @@ _page2(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
280{ 282{
281 Evas_Object *bt, *content, *ic, *nf = data; 283 Evas_Object *bt, *content, *ic, *nf = data;
282 char buf[PATH_MAX]; 284 char buf[PATH_MAX];
285 char img2[PATH_MAX];
283 Elm_Object_Item *it; 286 Elm_Object_Item *it;
284 287
288 snprintf(img2, sizeof(img2), "%s/images/plant_01.jpg", elm_app_data_dir_get());
285 bt = elm_button_add(nf); 289 bt = elm_button_add(nf);
286 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL); 290 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
287 evas_object_smart_callback_add(bt, "clicked", _page3, nf); 291 evas_object_smart_callback_add(bt, "clicked", _page3, nf);
@@ -306,6 +310,9 @@ test_naviframe_complex(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
306 Elm_Object_Item *it; 310 Elm_Object_Item *it;
307 int x; 311 int x;
308 312
313 char img1[PATH_MAX];
314 snprintf(img1, sizeof(img1), "%s/images/logo.png", elm_app_data_dir_get());
315
309 win = elm_win_util_standard_add("naviframe", "Naviframe"); 316 win = elm_win_util_standard_add("naviframe", "Naviframe");
310 elm_win_focus_highlight_enabled_set(win, EINA_TRUE); 317 elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
311 elm_win_autodel_set(win, EINA_TRUE); 318 elm_win_autodel_set(win, EINA_TRUE);