fix elm_photocam file set's error handle code

SVN revision: 81779
This commit is contained in:
Jiyoun Park 2012-12-28 03:54:24 +00:00
parent cea4dd84f1
commit 831f70a845
3 changed files with 21 additions and 0 deletions

View File

@ -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.

View File

@ -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:

View File

@ -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;