From 306929d859b9ad763217ce640cc8df2bf573eab3 Mon Sep 17 00:00:00 2001 From: Stephen Houston Date: Fri, 7 Aug 2015 09:07:08 -0500 Subject: [PATCH] Ephoto: Slideshow - Update the titlebar with the image name when the slideshow changes images. --- src/bin/ephoto_slideshow.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bin/ephoto_slideshow.c b/src/bin/ephoto_slideshow.c index 36b1015..cf14441 100644 --- a/src/bin/ephoto_slideshow.c +++ b/src/bin/ephoto_slideshow.c @@ -93,6 +93,12 @@ ephoto_slideshow_add(Ephoto *ephoto, Evas_Object *parent) return NULL; } +static void _image_shown(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_data EINA_UNUSED) +{ + Ephoto_Entry *entry = data; + ephoto_title_set(entry->ephoto, entry->basename); +} + static Evas_Object * _slideshow_item_get(void *data, Evas_Object *obj) { @@ -118,6 +124,7 @@ _slideshow_item_get(void *data, Evas_Object *obj) Evas_Object *image = elm_image_add(obj); elm_image_file_set(image, entry->path, group); elm_object_style_set(image, "shadow"); + evas_object_event_callback_add(image, EVAS_CALLBACK_SHOW, _image_shown, entry); return image; }