diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index ae893bbe17..c51f095bcb 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -849,3 +849,7 @@ 2012-12-20 Murilo Pinoti Belluzzo (mbelluzzo) * Add elm_systray to set a Status Notifier Item in the System Tray (D-Bus). + +2012-12-27 Jiyoun Park (jypark) + + * elm_photocam returns file_set error properly. diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index cd1a4b3db7..a9451370bd 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -104,6 +104,7 @@ Fixes: * Fix Don't elm_transit image animation use the image preloading to avoid image flickering. * Fix the image to show the image right now if the image preloading is disabled. * Fix typo from elm_plug signal "image.deleted", should be "image,deleted". + * Fix photocam returns file set error correctly. Removals: diff --git a/legacy/elementary/src/lib/elm_photocam.c b/legacy/elementary/src/lib/elm_photocam.c index 1904c40195..ab5c12c1af 100644 --- a/legacy/elementary/src/lib/elm_photocam.c +++ b/legacy/elementary/src/lib/elm_photocam.c @@ -1464,6 +1464,7 @@ _file_set(Eo *obj, void *_pd, va_list *list) { int w, h; double tz; + Evas_Load_Error err; const char *file = va_arg(*list, const char *); Evas_Load_Error *ret = va_arg(*list, Evas_Load_Error *); @@ -1480,6 +1481,13 @@ _file_set(Eo *obj, void *_pd, va_list *list) evas_object_image_file_set(sd->img, NULL, NULL); evas_object_image_load_scale_down_set(sd->img, 0); evas_object_image_file_set(sd->img, sd->file, NULL); + err = evas_object_image_load_error_get(sd->img); + if (err != EVAS_LOAD_ERROR_NONE) + { + ERR("Things are going bad for '%s' (%p)", file, sd->img); + if (ret) *ret = err; + return; + } evas_object_image_size_get(sd->img, &w, &h); sd->do_region = evas_object_image_region_support_get(sd->img); @@ -1502,6 +1510,14 @@ _file_set(Eo *obj, void *_pd, va_list *list) evas_object_image_file_set(sd->img, NULL, NULL); evas_object_image_load_scale_down_set(sd->img, 8); evas_object_image_file_set(sd->img, sd->file, NULL); + err = evas_object_image_load_error_get(sd->img); + if (err != EVAS_LOAD_ERROR_NONE) + { + ERR("Things are going bad for '%s' (%p)", file, sd->img); + if (ret) *ret = err; + return; + } + evas_object_image_preload(sd->img, 0); sd->main_load_pending = EINA_TRUE;