elementary/image - fix the image to show the image right away if the image preloading is disabled.

SVN revision: 81207
This commit is contained in:
ChunEon Park 2012-12-18 07:06:42 +00:00
parent 2402d4aad9
commit 8680aa4ec9
3 changed files with 27 additions and 11 deletions

View File

@ -830,3 +830,7 @@
2012-12-18 Chueon Park (Hermet)
* Don't Elm_transit image animation use image preloading to avoid image flickering.
2012-12-18 Chueon Park (Hermet)
* Let image update right now if the image preloading is disabled.

View File

@ -97,6 +97,7 @@ Fixes:
* Fix the popup that returned invalid action buttons.
* Fix the naviframe to not have crash even if user deletes the naviframe in the transition finished cb.
* 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.
Removals:

View File

@ -28,13 +28,13 @@ _on_image_preloaded(void *data,
void *event __UNUSED__)
{
Elm_Image_Smart_Data *sd = data;
sd->preloading = EINA_FALSE;
if (sd->show) evas_object_show(obj);
if (sd->prev_img) evas_object_del(sd->prev_img);
sd->prev_img = NULL;
if (sd->prev_img)
{
evas_object_del(sd->prev_img);
sd->prev_img = NULL;
}
}
static void
@ -715,15 +715,17 @@ _elm_image_smart_show(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
Elm_Image_Smart_Data *sd = _pd;
sd->show = EINA_TRUE;
if (sd->preloading)
return;
if (sd->preloading) return;
eo_do_super(obj, evas_obj_smart_show());
evas_object_show(sd->img);
if (sd->prev_img) evas_object_del(sd->prev_img);
sd->prev_img = NULL;
if (sd->prev_img)
{
evas_object_del(sd->prev_img);
sd->prev_img = NULL;
}
}
static void
@ -884,7 +886,6 @@ _elm_image_smart_memfile_set(Eo *obj, void *_pd, va_list *list)
(sd->img, (void *)img, size, (char *)format, (char *)key);
sd->preloading = EINA_TRUE;
evas_object_hide(sd->img);
evas_object_image_preload(sd->img, EINA_FALSE);
if (evas_object_image_load_error_get(sd->img) != EVAS_LOAD_ERROR_NONE)
{
@ -962,10 +963,20 @@ _elm_image_smart_preload_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *l
Eina_Bool disable = va_arg(*list, int);
if (sd->edje) return;
if (sd->edje || !sd->preloading) return;
evas_object_image_preload(sd->img, disable);
sd->preloading = !disable;
if (disable)
{
if (sd->show && sd->img) evas_object_show(sd->img);
if (sd->prev_img)
{
evas_object_del(sd->prev_img);
sd->prev_img = NULL;
}
}
}
static void