From: Enlightenment S. <no-...@en...> - 2012-12-18 07:06:49
|
Log: elementary/image - fix the image to show the image right away if the image preloading is disabled. Author: hermet Date: 2012-12-17 23:06:42 -0800 (Mon, 17 Dec 2012) New Revision: 81207 Trac: http://trac.enlightenment.org/e/changeset/81207 Modified: trunk/elementary/ChangeLog trunk/elementary/NEWS trunk/elementary/src/lib/elm_image.c Modified: trunk/elementary/ChangeLog =================================================================== --- trunk/elementary/ChangeLog 2012-12-18 07:04:13 UTC (rev 81206) +++ trunk/elementary/ChangeLog 2012-12-18 07:06:42 UTC (rev 81207) @@ -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. Modified: trunk/elementary/NEWS =================================================================== --- trunk/elementary/NEWS 2012-12-18 07:04:13 UTC (rev 81206) +++ trunk/elementary/NEWS 2012-12-18 07:06:42 UTC (rev 81207) @@ -97,6 +97,7 @@ * 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: Modified: trunk/elementary/src/lib/elm_image.c =================================================================== --- trunk/elementary/src/lib/elm_image.c 2012-12-18 07:04:13 UTC (rev 81206) +++ trunk/elementary/src/lib/elm_image.c 2012-12-18 07:06:42 UTC (rev 81207) @@ -28,13 +28,13 @@ 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_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 @@ (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 @@ 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 |