From: Jérémy Zurcher <jeremy@asynk.ch>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 25 Aug 2011 10:01:59 +0000 (10:01 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 25 Aug 2011 10:01:59 +0000 (10:01 +0000)
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

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@62796 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

45 files changed:
src/bin/config.c
src/bin/test.c
src/bin/test_3d.c
src/bin/test_anchorblock.c
src/bin/test_anim.c
src/bin/test_bg.c
src/bin/test_box.c
src/bin/test_bubble.c
src/bin/test_button.c
src/bin/test_check.c
src/bin/test_colorselector.c
src/bin/test_cursor.c
src/bin/test_diskselector.c
src/bin/test_entry.c
src/bin/test_flip.c
src/bin/test_flip_page.c
src/bin/test_floating.c
src/bin/test_focus.c
src/bin/test_focus2.c
src/bin/test_gengrid.c
src/bin/test_genlist.c
src/bin/test_gesture_layer.c
src/bin/test_hover.c
src/bin/test_hoversel.c
src/bin/test_icon.c
src/bin/test_icon_animated.c
src/bin/test_launcher.c
src/bin/test_layout.c
src/bin/test_list.c
src/bin/test_multi.c
src/bin/test_naviframe.c
src/bin/test_pager.c
src/bin/test_photo.c
src/bin/test_progressbar.c
src/bin/test_radio.c
src/bin/test_scroller.c
src/bin/test_segment_control.c
src/bin/test_slider.c
src/bin/test_thumb.c
src/bin/test_toggle.c
src/bin/test_toolbar.c
src/bin/test_tooltip.c
src/bin/test_transit.c
src/bin/test_win_inline.c
src/bin/test_win_state.c

index 6f30475..5f32d19 100644 (file)
@@ -1990,7 +1990,7 @@ _status_config_fonts(Evas_Object *win,
    evas_object_show(bx);
 
    /* FIXME: what to do here? dedicated widget? some new entry API set? */
-   snprintf(buf, sizeof(buf), "%s/objects/font_preview.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/font_preview.edj", elm_app_data_dir_get());
    preview = elm_layout_add(win);
    elm_layout_file_set(preview, buf, "font_preview");
    elm_object_text_part_set(preview, "elm.text", "Preview Text — 我真的会写中文");
index 4a72dfd..e930cd6 100644 (file)
@@ -468,9 +468,9 @@ elm_main(int argc, char **argv)
    char *autorun = NULL;
 
    /* tell elm about our app so it can figure out where to get files */
-   elm_app_info_set(elm_main, "elementary", "images/logo.png");
    elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
    elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
+   elm_app_info_set(elm_main, "elementary", "images/logo.png");
 
    /* if called with a single argument try to autorun a test with
     * the same name as the given param
index 9f14de3..34474eb 100644 (file)
@@ -47,7 +47,7 @@ _cube_new(Evas *evas, Evas_Coord w, Evas_Coord h, Evas_Coord d)
         o = evas_object_image_add(evas);
         c->side[i].o = o;
         snprintf(buf, sizeof(buf), "%s/images/%s",
-                 PACKAGE_DATA_DIR, "twofish.jpg");
+                 elm_app_data_dir_get(), "twofish.jpg");
         evas_object_image_file_set(o, buf, NULL);
         evas_object_image_fill_set(o, 0, 0, 256, 256);
         evas_object_resize(o, 256, 256);
index f05c8f3..0f9818b 100644 (file)
@@ -141,7 +141,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
@@ -169,7 +169,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    evas_object_show(bb);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -205,7 +205,7 @@ test_anchorblock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    evas_object_show(bb);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
index 0eb6426..9711a6e 100644 (file)
@@ -76,13 +76,13 @@ test_anim(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info _
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(bg);
 
-   snprintf(buf, sizeof(buf), "%s/images/bubble_sh.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/bubble_sh.png", elm_app_data_dir_get());
    for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++)
      {
         sh = evas_object_image_filled_add(evas_object_evas_get(win));
@@ -92,7 +92,7 @@ test_anim(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info _
         evas_object_data_set(win, names[(i * 2) + 1], sh);
      }
 
-   snprintf(buf, sizeof(buf), "%s/images/bubble.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/bubble.png", elm_app_data_dir_get());
     for (i = 0; i < (sizeof(names) / sizeof(char *) / 2); i++)
      {
         bub = evas_object_image_filled_add(evas_object_evas_get(win));
index a4e3bab..af9d47c 100644 (file)
@@ -22,7 +22,7 @@ _cb_overlay_changed(void *data, Evas_Object *obj, void *event __UNUSED__)
         Evas_Object *parent, *over;
         char buff[PATH_MAX];
 
-        snprintf(buff, sizeof(buff), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+        snprintf(buff, sizeof(buff), "%s/objects/test.edj", elm_app_data_dir_get());
         parent = elm_object_parent_widget_get(o_bg);
         over = edje_object_add(evas_object_evas_get(parent));
         edje_object_file_set(over, buff, "bg_overlay");
@@ -90,7 +90,7 @@ test_bg_image(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
@@ -125,7 +125,7 @@ test_bg_options(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_
    evas_object_show(box);
 
    o_bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_bg_file_set(o_bg, buf, NULL);
    evas_object_size_hint_weight_set(o_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(o_bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
index 4dec0f5..bab0b7b 100644 (file)
@@ -24,7 +24,7 @@ test_box_vert(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.5);
@@ -32,7 +32,7 @@ test_box_vert(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.0, 0.5);
@@ -40,7 +40,7 @@ test_box_vert(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, EVAS_HINT_EXPAND, 0.5);
@@ -144,7 +144,7 @@ test_box_horiz(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.5);
@@ -152,7 +152,7 @@ test_box_horiz(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.0);
@@ -160,7 +160,7 @@ test_box_horiz(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.0, EVAS_HINT_EXPAND);
index be13ebd..a4e8111 100644 (file)
@@ -31,7 +31,7 @@ test_bubble(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
index e85851a..b595f80 100644 (file)
@@ -59,7 +59,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    bt = elm_button_add(win);
@@ -72,7 +72,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(bx);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    bt = elm_button_add(win);
@@ -85,7 +85,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    bt = elm_button_add(win);
@@ -99,7 +99,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    bt = elm_button_add(win);
@@ -123,7 +123,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bt);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    bt = elm_button_add(win);
@@ -143,7 +143,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bt);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    bt = elm_button_add(win);
@@ -156,7 +156,7 @@ test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    bt = elm_button_add(win);
index 9ec071b..be807d2 100644 (file)
@@ -24,7 +24,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    ck = elm_check_add(win);
@@ -38,7 +38,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    ck = elm_check_add(win);
@@ -54,7 +54,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ck);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    ck = elm_check_add(win);
@@ -69,7 +69,7 @@ test_check(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    ck = elm_check_add(win);
index 553cb79..7994e7c 100644 (file)
@@ -51,7 +51,7 @@ test_colorselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *eve
    evas_object_show(fr);
 
    ly = elm_layout_add(win);
-   snprintf(buf, sizeof(buf), "%s/objects/colorpreview.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/colorpreview.edj", elm_app_data_dir_get());
    elm_layout_file_set(ly, buf, "main");
    evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
index 575fe62..e0987f7 100644 (file)
@@ -265,7 +265,7 @@ test_cursor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
    n = 0;
    for (i = 0; i < 3 * 3; i++)
      {
-        snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, img[n]);
+        snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), img[n]);
         n = (n + 1) % 9;
         ti[i].mode = i;
         ti[i].path = eina_stringshare_add(buf);
@@ -295,7 +295,7 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
    elm_win_title_set(win, "Cursor 3");
    elm_win_autodel_set(win, EINA_TRUE);
 
-   snprintf(buf, sizeof(buf), "%s/objects/cursors.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/cursors.edj", elm_app_data_dir_get());
    elm_theme_extension_add(NULL, buf);
 
    bg = elm_bg_add(win);
index b9c1a67..927806d 100644 (file)
@@ -116,7 +116,7 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
 
    disk = elm_diskselector_add(win);
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 1, 1);
    elm_diskselector_item_append(disk, "Sunday", ic, NULL, NULL);
@@ -135,7 +135,7 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
 
    disk = elm_diskselector_add(win);
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 1, 1);
    elm_diskselector_item_append(disk, "머리스타일", ic, NULL, NULL);
index 7025d8b..4322304 100644 (file)
@@ -125,7 +125,7 @@ test_entry(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
             " or even paths to image files on disk too like: "
             "<item absize=96x128 vsize=full href=file://%s/images/sky_01.jpg></item>"
             " ... end."
-            , PACKAGE_DATA_DIR
+            , elm_app_data_dir_get()
             );
    elm_entry_entry_set(en, buf);
    evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -1292,7 +1292,7 @@ test_entry4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bg);
 
    ly = elm_layout_add(win);
-   snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(ly, buf, "layout");
    evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, ly);
index 21f13a3..bfb7d43 100644 (file)
@@ -89,13 +89,13 @@ test_flip(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info _
    o = elm_bg_add(win);
    evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_01.jpg");
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_01.jpg");
    elm_bg_file_set(o, buf, NULL);
    elm_flip_content_front_set(fl, o);
    evas_object_show(o);
 
    ly = elm_layout_add(win);
-   snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(ly, buf, "layout");
    evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -214,7 +214,7 @@ test_flip2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_01.jpg");
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_01.jpg");
    elm_bg_file_set(bg, buf, NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -302,7 +302,7 @@ test_flip2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
             " or even paths to image files on disk too like: "
             "<item absize=96x128 vsize=full href=file://%s/images/sky_01.jpg></item>"
             " ... end."
-            , PACKAGE_DATA_DIR
+            , elm_app_data_dir_get()
            );
    elm_entry_entry_set(en, buf);
    evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -415,7 +415,7 @@ test_flip3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    o = elm_bg_add(win);
    evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_01.jpg");
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_01.jpg");
    elm_bg_file_set(o, buf, NULL);
    elm_flip_content_front_set(fl_f, o);
    evas_object_show(o);
@@ -423,7 +423,7 @@ test_flip3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    o = elm_bg_add(win);
    evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_02.jpg");
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_02.jpg");
    elm_bg_file_set(o, buf, NULL);
    elm_flip_content_back_set(fl_f, o);
    evas_object_show(o);
@@ -444,7 +444,7 @@ test_flip3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    o = elm_bg_add(win);
    evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_03.jpg");
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_03.jpg");
    elm_bg_file_set(o, buf, NULL);
    elm_flip_content_front_set(fl_b, o);
    evas_object_show(o);
@@ -452,7 +452,7 @@ test_flip3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    o = elm_bg_add(win);
    evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_04.jpg");
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_04.jpg");
    elm_bg_file_set(o, buf, NULL);
    elm_flip_content_back_set(fl_b, o);
    evas_object_show(o);
@@ -551,7 +551,7 @@ test_flip4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    im = evas_object_image_filled_add(evas_object_evas_get(win));
    evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    snprintf(buf, sizeof(buf), "%s/images/%s",
-            PACKAGE_DATA_DIR, "twofish.jpg");
+            elm_app_data_dir_get(), "twofish.jpg");
    evas_object_image_file_set(im, buf, NULL);
    elm_flip_content_front_set(fl, im);
    evas_object_show(im);
@@ -560,7 +560,7 @@ test_flip4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    im = evas_object_image_filled_add(evas_object_evas_get(win));
    evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    snprintf(buf, sizeof(buf), "%s/images/%s",
-            PACKAGE_DATA_DIR, "sky_04.jpg");
+            elm_app_data_dir_get(), "sky_04.jpg");
    evas_object_image_file_set(im, buf, NULL);
    elm_flip_content_back_set(fl, im);
    evas_object_show(im);
index b309685..2307a76 100644 (file)
@@ -854,7 +854,7 @@ test_flip_page(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 
    im2 = evas_object_image_filled_add(evas_object_evas_get(win));
    snprintf(buf, sizeof(buf), "%s/images/%s",
-            PACKAGE_DATA_DIR, "sky_04.jpg");
+            elm_app_data_dir_get(), "sky_04.jpg");
    evas_object_image_file_set(im2, buf, NULL);
    evas_object_move(im2, 40, 40);
    evas_object_resize(im2, 400, 400);
@@ -862,12 +862,12 @@ test_flip_page(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 
 #if 0
    im = elm_layout_add(win);
-   snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(im, buf, "layout");
 #else
    im = evas_object_image_filled_add(evas_object_evas_get(win));
    snprintf(buf, sizeof(buf), "%s/images/%s",
-            PACKAGE_DATA_DIR, "twofish.jpg");
+            elm_app_data_dir_get(), "twofish.jpg");
    evas_object_image_file_set(im, buf, NULL);
 #endif
    evas_object_move(im, 40, 40);
index 5fd47fd..898466a 100644 (file)
@@ -23,7 +23,7 @@ static Evas_Object *glf_icon_get(void *data __UNUSED__, Evas_Object *obj, const
 {
    char buf[PATH_MAX];
    Evas_Object *ic = elm_icon_add(obj);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    return ic;
index 721cadc..8e2ec52 100644 (file)
@@ -247,7 +247,7 @@ test_focus(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
      {//Second Col
         char buf[PATH_MAX];
         Evas_Object *ly = elm_layout_add(win);
-        snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+        snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
         elm_layout_file_set(ly, buf, "twolines");
         evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND,
                                          EVAS_HINT_EXPAND);
index 73be2df..16ed390 100644 (file)
@@ -49,6 +49,7 @@ void
 test_focus2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Evas_Object *win, *bg, *bx, *ly, *bt, *en, *bt1;
+   char buf[PATH_MAX];
 
    win = elm_win_add(NULL, "focus2", ELM_WIN_BASIC);
    elm_win_title_set(win, "Focus2");
@@ -92,7 +93,8 @@ test_focus2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bt);
 
    ly = elm_layout_add(PARENT);
-   elm_layout_file_set(ly, PACKAGE_DATA_DIR"/objects/test.edj", "layout");
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
+   elm_layout_file_set(ly, buf, "layout");
    evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
    elm_box_pack_end(bx, ly);
index 0ab23ab..0eaefc4 100644 (file)
@@ -189,7 +189,7 @@ test_gengrid(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
    n = 0;
    for (i = 0; i < 12 * 12; i++)
      {
-       snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, img[n]);
+       snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), img[n]);
        n = (n + 1) % 9;
        ti[i].mode = i;
        ti[i].path = eina_stringshare_add(buf);
@@ -216,7 +216,7 @@ _before_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __U
    sel = elm_gengrid_selected_item_get(grid);
    if (!sel)
        return;
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, img[rand() % 9]);
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), img[rand() % 9]);
    ti = malloc(sizeof(*ti));
    ti->mode = 0;
    ti->path = eina_stringshare_add(buf);
@@ -235,7 +235,7 @@ _after_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
    sel = elm_gengrid_selected_item_get(grid);
    if (!sel)
        return;
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, img[rand() % 9]);
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), img[rand() % 9]);
    ti = malloc(sizeof(*ti));
    ti->mode = 0;
    ti->path = eina_stringshare_add(buf);
@@ -250,7 +250,7 @@ _prepend_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __
    Evas_Object *grid = data;
    char buf[PATH_MAX];
 
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, img[rand() % 9]);
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), img[rand() % 9]);
    ti = malloc(sizeof(*ti));
    ti->mode = 0;
    ti->path = eina_stringshare_add(buf);
@@ -264,7 +264,7 @@ _append_bt_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __U
    Evas_Object *grid = data;
    char buf[PATH_MAX];
 
-   snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, img[rand() % 9]);
+   snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), img[rand() % 9]);
    ti = malloc(sizeof(*ti));
    ti->mode = 0;
    ti->path = eina_stringshare_add(buf);
index 163c8a0..3387594 100644 (file)
@@ -33,9 +33,9 @@ Evas_Object *gl_icon_get(void *data __UNUSED__, Evas_Object *obj, const char *pa
    char buf[PATH_MAX];
    Evas_Object *ic = elm_icon_add(obj);
    if (!strcmp(part, "elm.swallow.end"))
-     snprintf(buf, sizeof(buf), "%s/images/bubble.png", PACKAGE_DATA_DIR);
+     snprintf(buf, sizeof(buf), "%s/images/bubble.png", elm_app_data_dir_get());
    else
-     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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    return ic;
@@ -351,7 +351,7 @@ test_genlist2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -527,25 +527,25 @@ Evas_Object *gl2_icon_get(void *data, Evas_Object *obj, const char *part)
    if (!strcmp(part, "elm.swallow.icon"))
      {
         if (!(tit->mode & 0x3))
-          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());
         else if ((tit->mode & 0x3) == 1)
-          snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
+          snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
         else if ((tit->mode & 0x3) == 2)
-          snprintf(buf, sizeof(buf), "%s/images/panel_01.jpg", PACKAGE_DATA_DIR);
+          snprintf(buf, sizeof(buf), "%s/images/panel_01.jpg", elm_app_data_dir_get());
         else if ((tit->mode & 0x3) == 3)
-          snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", PACKAGE_DATA_DIR);
+          snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
         elm_icon_file_set(ic, buf, NULL);
      }
    else if (!strcmp(part, "elm.swallow.end"))
      {
         if (!(tit->mode & 0x3))
-          snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
+          snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
         else if ((tit->mode & 0x3) == 1)
-          snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+          snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
         else if ((tit->mode & 0x3) == 2)
-          snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", PACKAGE_DATA_DIR);
+          snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", elm_app_data_dir_get());
         else if ((tit->mode & 0x3) == 3)
-          snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
+          snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", 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);
@@ -822,7 +822,7 @@ Evas_Object *gl5_icon_get(void *data, Evas_Object *obj, const char *part)
         Evas_Object *ic;
         elm_box_horizontal_set(bx, EINA_TRUE);
         ic = elm_icon_add(obj);
-        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());
         elm_icon_file_set(ic, buf, NULL);
         elm_icon_scale_set(ic, 0, 0);
         evas_object_show(ic);
@@ -1084,7 +1084,7 @@ Evas_Object *gl4_icon_get(void *data __UNUSED__, Evas_Object *obj, const char *p
    if (!strcmp(part, "elm.swallow.icon"))
      {
         Evas_Object *ic = elm_icon_add(obj);
-        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());
         elm_icon_file_set(ic, buf, NULL);
         evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
         evas_object_show(ic);
@@ -1651,9 +1651,9 @@ Evas_Object *gl10_icon_get(void *data __UNUSED__, Evas_Object *obj, const char *
    char buf[PATH_MAX];
    Evas_Object *ic = elm_icon_add(obj);
    if (!strcmp(part, "elm.swallow.end"))
-     snprintf(buf, sizeof(buf), "%s/images/bubble.png", PACKAGE_DATA_DIR);
+     snprintf(buf, sizeof(buf), "%s/images/bubble.png", elm_app_data_dir_get());
    else
-     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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    return ic;
index 25b0f4b..2b6cf78 100644 (file)
@@ -237,6 +237,7 @@ Photo_Object *
 photo_object_add(Evas_Object *parent, Evas_Object *ic, const char *icon, Evas_Coord x,
       Evas_Coord y, Evas_Coord w, Evas_Coord h, int angle)
 {
+   char buf[PATH_MAX];
    Photo_Object *po;
    po = calloc(1, sizeof(*po));
    po->base_zoom = po->zoom = BASE_ZOOM;
@@ -259,7 +260,8 @@ photo_object_add(Evas_Object *parent, Evas_Object *ic, const char *icon, Evas_Co
    /* Add shadow */
      {
         po->shadow = elm_icon_add(po->ic);
-        elm_icon_file_set(po->shadow, PACKAGE_DATA_DIR "/images/pol_shadow.png", NULL);
+        snprintf(buf, sizeof(buf), "%s/images/pol_shadow.png", elm_app_data_dir_get());
+        elm_icon_file_set(po->shadow, buf, NULL);
         evas_object_resize(po->shadow, SHADOW_W, SHADOW_H);
         evas_object_show(po->shadow);
      }
@@ -300,6 +302,7 @@ test_gesture_layer(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
 {
    Evas_Coord w, h;
    Evas_Object *win, *bg;
+   char buf[PATH_MAX];
 
    w = 480;
    h = 800;
@@ -310,14 +313,16 @@ test_gesture_layer(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
    evas_object_resize(win, w, h);
 
    bg = elm_bg_add(win);
-   elm_bg_file_set(bg, PACKAGE_DATA_DIR "/images/wood_01.jpg", NULL);
+   snprintf(buf, sizeof(buf), "%s/images/wood_01.jpg", elm_app_data_dir_get());
+   elm_bg_file_set(bg, buf, NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(bg);
 
-
-   photo_object_add(win, NULL, PACKAGE_DATA_DIR "/images/pol_sky.png", 200, 200, 365, 400, 0);
-   photo_object_add(win, NULL, PACKAGE_DATA_DIR "/images/pol_twofish.png", 40, 300, 365, 400, 45);
+    snprintf(buf, sizeof(buf), "%s/images/pol_sky.png", elm_app_data_dir_get());
+   photo_object_add(win, NULL, buf, 200, 200, 365, 400, 0);
+   snprintf(buf, sizeof(buf), "%s/images/pol_twofish.png", elm_app_data_dir_get());
+   photo_object_add(win, NULL, buf, 40, 300, 365, 400, 45);
 
    Evas_Object *en = elm_entry_add(win);
    elm_entry_entry_set(en, "You can use whatever object you want, "
@@ -325,7 +330,8 @@ test_gesture_layer(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
    elm_entry_line_wrap_set(en, ELM_WRAP_MIXED);
 
    Evas_Object *postit = elm_layout_add(win);
-   elm_layout_file_set(postit, PACKAGE_DATA_DIR "/objects/postit_ent.edj", "main");
+   snprintf(buf, sizeof(buf), "%s/objects/postit_ent.edj", elm_app_data_dir_get());
+   elm_layout_file_set(postit, buf, "main");
    elm_layout_content_set(postit, "ent", en);
 
    photo_object_add(win, postit, NULL, 50, 50, 382, 400, 355);
index 20919e8..db27639 100644 (file)
@@ -47,7 +47,7 @@ test_hover(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    bx = elm_box_add(win);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    elm_box_pack_end(bx, ic);
@@ -129,7 +129,7 @@ test_hover2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    bx = elm_box_add(win);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    elm_box_pack_end(bx, ic);
index 1a04881..a55ac63 100644 (file)
@@ -63,7 +63,7 @@ test_hoversel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    elm_hoversel_hover_parent_set(bt, win);
    elm_object_text_set(bt, "All Icons");
    elm_hoversel_item_add(bt, "Item 1", "apps", ELM_ICON_STANDARD, NULL, NULL);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_hoversel_item_add(bt, "Item 2", buf, ELM_ICON_FILE, NULL, NULL);
    elm_hoversel_item_add(bt, "Item 3", "home", ELM_ICON_STANDARD, NULL, NULL);
    elm_hoversel_item_add(bt, "Item 4", "close", ELM_ICON_STANDARD, NULL, NULL);
@@ -88,7 +88,7 @@ test_hoversel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    elm_object_text_set(bt, "Icon + Label");
 
    ic = elm_icon_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", elm_app_data_dir_get());
    elm_icon_file_set(ic, buf, NULL);
    elm_hoversel_icon_set(bt, ic);
    evas_object_show(ic);
index ccbf30c..43e5efe 100644 (file)
@@ -21,7 +21,7 @@ test_icon(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info _
    elm_win_alpha_set(win, 1);
 
    ic = elm_icon_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_no_scale_set(ic, 1);
index c1ba563..d970f90 100644 (file)
@@ -27,7 +27,7 @@ test_icon_animated(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *eve
    elm_win_alpha_set(win, 1);
 
    ic = elm_icon_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/animated_logo.gif", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/animated_logo.gif", elm_app_data_dir_get());
    elm_icon_file_set(ic, buf, NULL);
    if (elm_icon_animated_available_get(ic))
      {
index 1016840..e9eac1b 100644 (file)
@@ -206,7 +206,7 @@ test_launcher(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
@@ -263,7 +263,7 @@ test_launcher(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
                {
                   ic = elm_icon_add(win);
                   elm_object_scale_set(ic, 0.5);
-                  snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", PACKAGE_DATA_DIR, n);
+                  snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", elm_app_data_dir_get(), n);
                   elm_icon_file_set(ic, buf, NULL);
                   elm_icon_scale_set(ic, 0, 0);
                   evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -389,7 +389,7 @@ test_launcher2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
@@ -402,7 +402,7 @@ test_launcher2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    for (k = 0 ; k < 8; k++)
      {
         ly = elm_layout_add(win);
-        snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+        snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
         elm_layout_file_set(ly, buf, "layout");
         evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
@@ -737,7 +737,7 @@ test_launcher3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_win_resize_object_add(win, bg);
@@ -787,7 +787,7 @@ test_launcher3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
         evas_object_show(mb);
 
         ly = elm_layout_add(win);
-        snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+        snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
         elm_layout_file_set(ly, buf, "launcher_page");
         evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
         evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -799,7 +799,7 @@ test_launcher3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
              for (i = 0; i < 4; i++)
                {
                   ly2 = elm_layout_add(win);
-                  snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+                  snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
                   elm_layout_file_set(ly2, buf, "launcher_icon");
                   evas_object_size_hint_weight_set(ly2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
                   evas_object_size_hint_align_set(ly2, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -807,7 +807,7 @@ test_launcher3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
 
                   ic = elm_icon_add(win);
                   elm_object_scale_set(ic, 0.5);
-                  snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", PACKAGE_DATA_DIR, n);
+                  snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", elm_app_data_dir_get(), n);
                   elm_icon_file_set(ic, buf, NULL);
                   elm_icon_scale_set(ic, 0, 0);
                   evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
index 51beb44..9f47f3b 100644 (file)
@@ -51,7 +51,7 @@ test_layout(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    elm_layout_end_set(ly, bt);
 
    ly = elm_layout_add(win);
-   snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(ly, buf, "layout");
    evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    elm_box_pack_end(box, ly);
index 68e40f9..dca0565 100644 (file)
@@ -67,12 +67,12 @@ test_list(void        *data __UNUSED__,
    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 1, 1);
    it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
    ic = elm_icon_add(win);
-   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());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
@@ -93,7 +93,7 @@ test_list(void        *data __UNUSED__,
    elm_box_horizontal_set(bx, EINA_TRUE);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.5);
@@ -101,7 +101,7 @@ test_list(void        *data __UNUSED__,
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.0);
@@ -109,7 +109,7 @@ test_list(void        *data __UNUSED__,
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.0, EVAS_HINT_EXPAND);
@@ -215,12 +215,12 @@ test_list_horizontal(void        *data __UNUSED__,
    evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 1, 1);
    it1 = elm_list_item_append(li, "Hello", ic, NULL, NULL, NULL);
    ic = elm_icon_add(win);
-   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());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
@@ -240,7 +240,7 @@ test_list_horizontal(void        *data __UNUSED__,
    bx = elm_box_add(win);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.5);
@@ -248,7 +248,7 @@ test_list_horizontal(void        *data __UNUSED__,
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.0);
@@ -352,7 +352,7 @@ test_list2(void        *data __UNUSED__,
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -370,12 +370,12 @@ test_list2(void        *data __UNUSED__,
 //   elm_list_multi_select_set(li, 1);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    it = elm_list_item_append(li, "Hello", ic, NULL, my_li2_sel, NULL);
    elm_list_item_selected_set(it, 1);
    ic = elm_icon_add(win);
-   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());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    elm_list_item_append(li, "world", ic, NULL, NULL, NULL);
@@ -396,7 +396,7 @@ test_list2(void        *data __UNUSED__,
    elm_box_horizontal_set(bx2, EINA_TRUE);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.5);
@@ -404,7 +404,7 @@ test_list2(void        *data __UNUSED__,
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.0);
@@ -492,7 +492,7 @@ test_list3(void        *data __UNUSED__,
    elm_list_mode_set(li, ELM_LIST_COMPRESS);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    ic2 = elm_button_add(win);
@@ -502,7 +502,7 @@ test_list3(void        *data __UNUSED__,
    elm_list_item_append(li, "Hello", ic, ic2, _it_clicked, NULL);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    ic2 = elm_button_add(win);
@@ -527,7 +527,7 @@ test_list3(void        *data __UNUSED__,
    elm_box_horizontal_set(bx, EINA_TRUE);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.5);
@@ -535,7 +535,7 @@ test_list3(void        *data __UNUSED__,
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.5, 0.0);
@@ -543,7 +543,7 @@ test_list3(void        *data __UNUSED__,
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_align_set(ic, 0.0, EVAS_HINT_EXPAND);
@@ -674,7 +674,7 @@ test_list4(void        *data __UNUSED__,
                            "line-up, Floyd went on to achieve worldwide critical and commercial success with the "        \
                            "conceptalbums The Dark Side of the Moon, Wish You Were Here, Animals, and The Wall.";
    ic = elm_icon_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/mystrale.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/mystrale.jpg", elm_app_data_dir_get());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    elm_list_item_append(li, "Pink Floyd", ic, NULL, NULL, &pf_data);
@@ -691,7 +691,7 @@ test_list4(void        *data __UNUSED__,
                            "self-effacing approach to rock and roll, Dire Straits soon became hugely successful, with " \
                            "their first album going multi-platinum globally.";
    ic = elm_icon_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/mystrale_2.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/mystrale_2.jpg", elm_app_data_dir_get());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    elm_list_item_append(li, "Dire Straits", ic, NULL, NULL, &ds_data);
@@ -703,7 +703,7 @@ test_list4(void        *data __UNUSED__,
                            "Germany, the Netherlands, Scandinavia, the Balkans, Japan and Russia, where they still "    \
                            "perform at stadium-sized venues.";
    ic = elm_icon_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/icon_17.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/icon_17.png", elm_app_data_dir_get());
    elm_icon_scale_set(ic, 1, 1);
    elm_icon_file_set(ic, buf, NULL);
    elm_list_item_append(li, "Uriah Heep", ic, NULL, NULL, &uh_data);
@@ -715,7 +715,7 @@ test_list4(void        *data __UNUSED__,
                           "achieving their current form when Peart replaced original drummer John Rutsey in July 1974, " \
                           "two weeks before the group's first United States tour.";
    ic = elm_icon_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/icon_21.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/icon_21.png", elm_app_data_dir_get());
    elm_icon_scale_set(ic, 0, 0);
    elm_icon_file_set(ic, buf, NULL);
    ic2 = elm_icon_add(win);
index cb6134d..667918a 100644 (file)
@@ -101,7 +101,7 @@ test_multi(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
      {
         char buf[PATH_MAX];
 
-        snprintf(buf, sizeof(buf), "%s/objects/multip.edj", PACKAGE_DATA_DIR);
+        snprintf(buf, sizeof(buf), "%s/objects/multip.edj", elm_app_data_dir_get());
         indicator[i] = edje_object_add(evas_object_evas_get(win));
         edje_object_file_set(indicator[i], buf, "point");
      }
index 5cc5e81..8cc9cd9 100644 (file)
@@ -34,7 +34,7 @@ _page4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
    ic = elm_icon_add(nf);
-   snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.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);
    elm_button_icon_set(bt, ic);
@@ -44,7 +44,7 @@ _page4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    elm_object_text_set(bt2, "Naviframe Test");
 
    ic = elm_icon_add(nf);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -82,7 +82,7 @@ _page3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    elm_object_text_set(bt3, "Naviframe Test");
 
    ic = elm_icon_add(nf);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -112,7 +112,7 @@ _page2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    elm_object_text_set(bt2, "Naviframe Test");
 
    ic = elm_icon_add(nf);
-   snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/icon_right_arrow.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);
    elm_button_icon_set(bt, ic);
index 93a3957..5676dd2 100644 (file)
@@ -203,13 +203,13 @@ test_pager(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    char buf[4096];
 
    ly = elm_layout_add(win);
-   snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(ly, buf, "test/layout");
    evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_show(ly);
 
    ly2 = elm_layout_add(win);
-   snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(ly2, buf, "layout2");
    evas_object_size_hint_weight_set(ly2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    //elm_win_resize_object_add(win, ly2);
index 8e1bf95..fd7b77b 100644 (file)
@@ -46,7 +46,7 @@ test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
           {
              ph = elm_photo_add(win);
              snprintf(buf, sizeof(buf), "%s/images/%s",
-                      PACKAGE_DATA_DIR, img[n]);
+                      elm_app_data_dir_get(), img[n]);
              n++;
              if (n >= 9) n = 0;
              elm_photo_size_set(ph, 80);
index 688d2d7..c4ed5f2 100644 (file)
@@ -109,7 +109,7 @@ test_progressbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    _test_progressbar.pb2 = pb;
 
    ic1 = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic1, buf, NULL);
    evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
index 9601f6e..2b91628 100644 (file)
@@ -24,7 +24,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -40,7 +40,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    rdg = rd;
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
 
@@ -69,7 +69,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(rd);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
 
@@ -82,7 +82,7 @@ test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
 
index 8bb4395..0776ebd 100644 (file)
@@ -65,7 +65,7 @@ test_scroller(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
           {
              bg2 = elm_bg_add(win);
              snprintf(buf, sizeof(buf), "%s/images/%s",
-                      PACKAGE_DATA_DIR, img[n]);
+                      elm_app_data_dir_get(), img[n]);
              n++;
              if (n >= 9) n = 0;
              elm_bg_file_set(bg2, buf, NULL);
index 8dff678..63ad4e3 100644 (file)
@@ -31,17 +31,17 @@ test_segment_control(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e
 
    in_layout = elm_layout_add( win );
    elm_win_resize_object_add(win, in_layout);
-   snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
    elm_layout_file_set(in_layout, buf, "segment_test");
    evas_object_size_hint_weight_set(in_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
    ic = elm_icon_add(in_layout);
-   snprintf(buf1, sizeof(buf1), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf1, sizeof(buf1), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic, buf1, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
 
    ic1 = elm_icon_add(in_layout);
-   snprintf(buf2, sizeof(buf2), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf2, sizeof(buf2), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic1, buf2, NULL);
    evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
 
@@ -61,17 +61,17 @@ test_segment_control(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e
    it4 = elm_segment_control_item_add(segment2, NULL, "SegmentItem");
 
    ic2 = elm_icon_add(in_layout);
-   snprintf(buf3, sizeof(buf3), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf3, sizeof(buf3), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic2, buf3, NULL);
    evas_object_size_hint_aspect_set(ic2, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
 
    ic3 = elm_icon_add(in_layout);
-   snprintf(buf4, sizeof(buf4), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf4, sizeof(buf4), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic3, buf4, NULL);
    evas_object_size_hint_aspect_set(ic3, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
 
    ic4 = elm_icon_add(in_layout);
-   snprintf(buf5, sizeof(buf5), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf5, sizeof(buf5), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic4, buf5, NULL);
    evas_object_size_hint_aspect_set(ic4, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
 
@@ -82,7 +82,7 @@ test_segment_control(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e
    it3 = elm_segment_control_item_add(segment3, ic4, NULL);
 
    ic5 = elm_icon_add(in_layout);
-   snprintf(buf6, sizeof(buf6), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf6, sizeof(buf6), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic5, buf6, NULL);
    evas_object_size_hint_aspect_set(ic5, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
 
index f2acebb..2b19f85 100644 (file)
@@ -32,7 +32,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -50,7 +50,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    /* horizontal disable state */
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -69,7 +69,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(sl);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -91,7 +91,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    /* label2 disable */
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -135,7 +135,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bx2);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
 
@@ -173,7 +173,7 @@ test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
 
    /* vertical disable state */
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
 
index eb9ec04..7f01f87 100644 (file)
@@ -44,7 +44,7 @@ test_thumb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
         for (i = 0; i < 12; i++)
           {
              th = elm_thumb_add(win);
-             snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR,
+             snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(),
                       img[n]);
              n = (n + 1) % 11;
              elm_thumb_file_set(th, buf, img[n]);
index 7962855..7a91f45 100644 (file)
@@ -24,7 +24,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(bx);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -40,7 +40,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
 
@@ -52,7 +52,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(ic);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
 
@@ -72,7 +72,7 @@ test_toggle(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
    evas_object_show(tg);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
 
index d5aa05e..6dca53a 100644 (file)
@@ -7,7 +7,7 @@ static void
 tb_1(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    char buf[PATH_MAX];
-   snprintf(buf, sizeof(buf), "%s/images/panel_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/panel_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(data, buf);
 }
 
@@ -15,7 +15,7 @@ static void
 tb_2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    char buf[PATH_MAX];
-   snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(data, buf);
 }
 
@@ -23,7 +23,7 @@ static void
 tb_3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    char buf[PATH_MAX];
-   snprintf(buf, sizeof(buf), "%s/images/wood_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/wood_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(data, buf);
 }
 
@@ -45,7 +45,7 @@ static void
 tb_4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    char buf[PATH_MAX];
-   snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", elm_app_data_dir_get());
    elm_photo_file_set(data, buf);
 }
 
@@ -132,7 +132,7 @@ test_toolbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
 
    ph = ph1;
    elm_photo_size_set(ph, 40);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -148,7 +148,7 @@ test_toolbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
 
    ph = ph3;
    elm_photo_size_set(ph, 20);
-   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -157,7 +157,7 @@ test_toolbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
 
    ph = ph4;
    elm_photo_size_set(ph, 60);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -242,7 +242,7 @@ test_toolbar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph1;
    elm_photo_size_set(ph, 40);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -258,7 +258,7 @@ test_toolbar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph3;
    elm_photo_size_set(ph, 20);
-   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -267,7 +267,7 @@ test_toolbar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph4;
    elm_photo_size_set(ph, 60);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -352,7 +352,7 @@ test_toolbar3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph1;
    elm_photo_size_set(ph, 40);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -368,7 +368,7 @@ test_toolbar3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph3;
    elm_photo_size_set(ph, 20);
-   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -377,7 +377,7 @@ test_toolbar3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph4;
    elm_photo_size_set(ph, 60);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -462,7 +462,7 @@ test_toolbar4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph1;
    elm_photo_size_set(ph, 40);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -478,7 +478,7 @@ test_toolbar4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph3;
    elm_photo_size_set(ph, 20);
-   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -487,7 +487,7 @@ test_toolbar4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph4;
    elm_photo_size_set(ph, 60);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -541,7 +541,8 @@ test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
    elm_toolbar_item_disabled_set(item, EINA_TRUE);
    elm_toolbar_item_priority_set(item, 100);
 
-   item = elm_toolbar_item_append(tb, PACKAGE_DATA_DIR"/images/icon_04.png", "World", tb_2, ph1);
+   snprintf(buf, sizeof(buf), "%s/images/icon_04.pngj", elm_app_data_dir_get());
+   item = elm_toolbar_item_append(tb, buf, "World", tb_2, ph1);
    elm_toolbar_item_priority_set(item, -100);
 
    item = elm_toolbar_item_append(tb, "object-rotate-right", "H", tb_3a, ph4);
@@ -577,7 +578,7 @@ test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph1;
    elm_photo_size_set(ph, 40);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -593,7 +594,7 @@ test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph3;
    elm_photo_size_set(ph, 20);
-   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -602,7 +603,7 @@ test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph4;
    elm_photo_size_set(ph, 60);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -689,7 +690,7 @@ test_toolbar6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph1;
    elm_photo_size_set(ph, 40);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -705,7 +706,7 @@ test_toolbar6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph3;
    elm_photo_size_set(ph, 20);
-   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
@@ -714,7 +715,7 @@ test_toolbar6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 
    ph = ph4;
    elm_photo_size_set(ph, 60);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_photo_file_set(ph, buf);
    evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(ph, 0.5, 0.5);
index 94e2861..70c7e90 100644 (file)
@@ -115,7 +115,7 @@ _tt_item_icon(void *data   __UNUSED__,
    Evas_Object *ic = elm_icon_add(tt);
    char buf[PATH_MAX];
    snprintf(buf, sizeof(buf), "%s/images/logo_small.png",
-            PACKAGE_DATA_DIR);
+            elm_app_data_dir_get());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_resize(ic, 64, 64);
@@ -130,7 +130,7 @@ _tt_item_icon2(void *data   __UNUSED__,
 {
    Evas_Object *ic = elm_icon_add(tt);
    char buf[PATH_MAX];
-   snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    return ic;
@@ -144,7 +144,7 @@ _tt_item_icon3(void *data   __UNUSED__,
 {
    Evas_Object *ic = elm_icon_add(tt);
    char buf[PATH_MAX];
-   snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    return ic;
@@ -234,7 +234,7 @@ _tt_icon(void *data   __UNUSED__,
    Evas_Object *ic = elm_icon_add(tt);
    char buf[PATH_MAX];
    snprintf(buf, sizeof(buf), "%s/images/logo_small.png",
-            PACKAGE_DATA_DIR);
+            elm_app_data_dir_get());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_resize(ic, 64, 64);
@@ -248,7 +248,7 @@ _tt_icon2(void *data   __UNUSED__,
 {
    Evas_Object *ic = elm_icon_add(tt);
    char buf[PATH_MAX];
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_resize(ic, 64, 64);
@@ -553,7 +553,7 @@ test_tooltip2(void *data       __UNUSED__,
    n = 0;
    for (i = 0; i < 9; i++)
      {
-        snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR,
+        snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(),
                  img[n]);
         n++;
         ti[i].mode = i;
index 932f1dd..e1ddc39 100644 (file)
@@ -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);
index ce53b91..a51cd7d 100644 (file)
@@ -47,7 +47,7 @@ fill(Evas_Object *win, Eina_Bool do_bg)
    elm_box_pack_end(bx, en);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
@@ -72,7 +72,7 @@ fill(Evas_Object *win, Eina_Bool do_bg)
    evas_object_show(bb);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
@@ -106,7 +106,7 @@ fill(Evas_Object *win, Eina_Bool do_bg)
    evas_object_show(bb);
 
    ic = elm_icon_add(win);
-   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());
    elm_icon_file_set(ic, buf, NULL);
    elm_icon_scale_set(ic, 0, 0);
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);
@@ -188,7 +188,7 @@ create_handles(Evas_Object *obj)
 
         hand = evas_object_image_filled_add(evas_object_evas_get(obj));
         evas_object_resize(hand, 31, 31);
-        snprintf(buf, sizeof(buf), "%s/images/pt.png", PACKAGE_DATA_DIR);
+        snprintf(buf, sizeof(buf), "%s/images/pt.png", elm_app_data_dir_get());
         evas_object_image_file_set(hand, buf, NULL);
         if (i == 0)      evas_object_move(hand, x     - 15, y     - 15);
         else if (i == 1) evas_object_move(hand, x + w - 15, y     - 15);
@@ -212,7 +212,7 @@ test_win_inline(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
index 478e453..f84d5c9 100644 (file)
@@ -248,7 +248,7 @@ test_win_state2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_
    elm_win_autodel_set(win, EINA_TRUE);
 
    bg = elm_bg_add(win);
-   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
+   snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", elm_app_data_dir_get());
    elm_bg_file_set(bg, buf, NULL);
    elm_win_resize_object_add(win, bg);
    evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);