Make edje work in slideshow as well

SVN revision: 60876
This commit is contained in:
Stephen Houston 2011-06-30 16:11:35 +00:00
parent f403c0d731
commit d0cc5e7849
1 changed files with 19 additions and 3 deletions

View File

@ -140,9 +140,25 @@ _slideshow_item_get(void *data, Evas_Object *obj)
Ephoto_Entry *entry = data; Ephoto_Entry *entry = data;
/* TODO use viewer from ephoto_single_browser.c */ /* TODO use viewer from ephoto_single_browser.c */
/* TODO consider using exif rotation, see ephoto_single_browser.c */ /* TODO consider using exif rotation, see ephoto_single_browser.c */
Evas_Object *image = elm_photo_add(obj); const char *group = NULL;
elm_photo_file_set(image, entry->path); const char *ext = strrchr(entry->path, '.');
elm_photo_fill_inside_set(image, EINA_TRUE); if (ext)
{
ext++;
if ((strcasecmp(ext, "edj") == 0))
{
if (edje_file_group_exists(entry->path, "e,desktop,background"))
group = "e,desktop,background";
else
{
Eina_List *g = edje_file_collection_list(entry->path);
group = eina_list_data_get(g);
edje_file_collection_list_free(g);
}
}
}
Evas_Object *image = elm_image_add(obj);
elm_image_file_set(image, entry->path, group);
elm_object_style_set(image, "shadow"); elm_object_style_set(image, "shadow");
evas_object_data_set evas_object_data_set