forked from enlightenment/efl
make elm robust and handle if u DONT set compile time dirs.. and work
anyway. SVN revision: 69750
This commit is contained in:
parent
8c17d99712
commit
c3691314e7
|
@ -10,6 +10,7 @@ elm_main(int argc, char **argv)
|
|||
Evas_Object *win, *bg, *image;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg");
|
||||
win = elm_win_add(NULL, "image", ELM_WIN_BASIC);
|
||||
elm_win_title_set(win, "Image");
|
||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||
|
@ -21,7 +22,7 @@ elm_main(int argc, char **argv)
|
|||
elm_win_resize_object_add(win, bg);
|
||||
evas_object_show(bg);
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", DATA_DIR);
|
||||
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
|
||||
|
||||
image = elm_image_add(win);
|
||||
if (!elm_image_file_set(image, buf, NULL))
|
||||
|
|
|
@ -107,6 +107,7 @@ _prefix_check(void)
|
|||
char **argv = NULL;
|
||||
const char *dirs[4] = { NULL, NULL, NULL, NULL };
|
||||
char *caps = NULL, *p1, *p2;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
if (app_pfx) return;
|
||||
if (!app_domain) return;
|
||||
|
@ -118,11 +119,15 @@ _prefix_check(void)
|
|||
dirs[1] = app_compile_lib_dir;
|
||||
dirs[2] = app_compile_data_dir;
|
||||
dirs[3] = app_compile_locale_dir;
|
||||
|
||||
if (!dirs[1]) dirs[1] = dirs[0];
|
||||
if (!dirs[0]) dirs[0] = dirs[1];
|
||||
|
||||
if (!dirs[0]) dirs[0] = "/usr/local/bin";
|
||||
if (!dirs[1]) dirs[1] = "/usr/local/lib";
|
||||
if (!dirs[2])
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "/usr/local/share/%s", app_domain);
|
||||
dirs[2] = buf;
|
||||
}
|
||||
if (!dirs[3]) dirs[3] = dirs[2];
|
||||
if (!dirs[2]) dirs[2] = dirs[3];
|
||||
|
||||
if (app_domain)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue