This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efm2.
View the commit online.
commit d31eb87ddb48eaf65ebbcff7feb0ec3bc065c294
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
AuthorDate: Mon Jun 26 10:04:03 2023 +0100
fix black icons
---
src/efm/efm_icon.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/efm/efm_icon.c b/src/efm/efm_icon.c
index ad8e1bf..91e1f8c 100644
--- a/src/efm/efm_icon.c
+++ b/src/efm/efm_icon.c
@@ -25,6 +25,7 @@ struct _Smart_Data
Eina_Stringshare *thumb; // thumb path
Eina_Stringshare *video; // video path
Ecore_Timer *anim_timer; // timer for animation frame flipping
+ Ecore_Job *preload_job; // defer handling of preload a bit
int load_size; // the sie we want to load now
int orig_w, orig_h; // the sie of the img we loaded
@@ -68,6 +69,11 @@ _image_add(Smart_Data *sd)
{ // add a new hidden image object (image2) that will be busy loading
Evas_Object *o;
+ if (sd->preload_job)
+ {
+ ecore_job_del(sd->preload_job);
+ sd->preload_job = NULL;
+ }
if (sd->o_image2) evas_object_del(sd->o_image2);
sd->o_image2 = o = evas_object_image_filled_add
(evas_object_evas_get(sd->o_smart));
@@ -371,6 +377,16 @@ _handle_frame(Smart_Data *sd)
sd->anim_timer = ecore_timer_add(t, _cb_anim_timer, sd);
}
+static void
+_cb_imae_preload_show_delay(void *data)
+{
+ Smart_Data *sd = data;
+
+ sd->preload_job = NULL;
+ evas_object_show(sd->o_image);
+ if (sd->animated) _handle_frame(sd);
+}
+
static void
_cb_image_preload(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{ // whenb an image that was being loaded in the background has now finished
@@ -382,7 +398,6 @@ _cb_image_preload(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
sd->o_image2 = NULL;
evas_object_image_size_get(sd->o_image, &(sd->orig_w), &(sd->orig_h));
sd->alpha = evas_object_image_alpha_get(sd->o_image);
- evas_object_show(sd->o_image);
if (sd->newfile)
{
sd->newfile = EINA_FALSE;
@@ -395,8 +410,9 @@ _cb_image_preload(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
sd->frame_count = evas_object_image_animated_frame_count_get(sd->o_image);
if (sd->frame_count < 3) sd->loop_type = EVAS_IMAGE_ANIMATED_HINT_LOOP;
else if (sd->frame_count < 2) sd->animated = EINA_FALSE;
- if (sd->animated) _handle_frame(sd);
}
+ if (sd->preload_job) ecore_job_del(sd->preload_job);
+ sd->preload_job = ecore_job_add(_cb_imae_preload_show_delay, sd);
}
// gui code
@@ -449,6 +465,11 @@ _smart_del(Evas_Object *obj)
ecore_timer_del(sd->anim_timer);
sd->anim_timer = NULL;
}
+ if (sd->preload_job)
+ {
+ ecore_job_del(sd->preload_job);
+ sd->preload_job = NULL;
+ }
eina_stringshare_replace(&(sd->thumb), NULL);
eina_stringshare_replace(&(sd->file), NULL);
eina_stringshare_replace(&(sd->video), NULL);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.