summaryrefslogtreecommitdiff
path: root/src/examples/bg_example_02.c
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-28 08:42:24 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-03-28 08:42:24 +0000
commitfc704fd5d7981fe4cccd990873fd352d69707d17 (patch)
tree64ba4f245d28fa274931e05daa818802963af9ed /src/examples/bg_example_02.c
parentf84b3cda618180232412b72ad849a5d23b80dbcd (diff)
elm examples: Adjust directory names.
SVN revision: 69699
Diffstat (limited to 'src/examples/bg_example_02.c')
-rw-r--r--src/examples/bg_example_02.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/examples/bg_example_02.c b/src/examples/bg_example_02.c
index 9ebc73cce..ea5905ca3 100644
--- a/src/examples/bg_example_02.c
+++ b/src/examples/bg_example_02.c
@@ -1,8 +1,11 @@
1//Compile with: 1//Compile with:
2//gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary` -DPACKAGE_DATA_DIR="\"<directory>\"" 2//gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary` -DDATA_DIR="\"<directory>\""
3//where directory is the a path where images/plant_01.jpg can be found. 3//where directory is the a path where images/plant_01.jpg can be found.
4 4
5#include <Elementary.h> 5#include <Elementary.h>
6#ifndef DATA_DIR
7# define DATA_DIR "/usr/share/elementary"
8#endif
6 9
7static void 10static void
8on_done(void *data, Evas_Object *obj, void *event_info) 11on_done(void *data, Evas_Object *obj, void *event_info)
@@ -25,7 +28,7 @@ elm_main(int argc, char **argv)
25 bg = elm_bg_add(win); 28 bg = elm_bg_add(win);
26 elm_bg_load_size_set(bg, 20, 20); 29 elm_bg_load_size_set(bg, 20, 20);
27 elm_bg_option_set(bg, ELM_BG_OPTION_CENTER); 30 elm_bg_option_set(bg, ELM_BG_OPTION_CENTER);
28 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", PACKAGE_DATA_DIR); 31 snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", DATA_DIR);
29 elm_bg_file_set(bg, buf, NULL); 32 elm_bg_file_set(bg, buf, NULL);
30 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 33 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
31 elm_win_resize_object_add(win, bg); 34 elm_win_resize_object_add(win, bg);