From d0cc5e78497e46d8581f8fc7b7a7305cff4c8285 Mon Sep 17 00:00:00 2001 From: Stephen Houston Date: Thu, 30 Jun 2011 16:11:35 +0000 Subject: [PATCH] Make edje work in slideshow as well SVN revision: 60876 --- src/bin/ephoto_slideshow.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c index 5bfbed6..35f1a23 100644 --- a/src/bin/ephoto_slideshow.c +++ b/src/bin/ephoto_slideshow.c @@ -140,9 +140,25 @@ _slideshow_item_get(void *data, Evas_Object *obj) Ephoto_Entry *entry = data; /* TODO use viewer from ephoto_single_browser.c */ /* TODO consider using exif rotation, see ephoto_single_browser.c */ - Evas_Object *image = elm_photo_add(obj); - elm_photo_file_set(image, entry->path); - elm_photo_fill_inside_set(image, EINA_TRUE); + const char *group = NULL; + const char *ext = strrchr(entry->path, '.'); + 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"); evas_object_data_set