aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/bin/e_widget_preview.c14
3 files changed, 18 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6331c56cc..300dd7bb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-07 Cedric Bail
+
+ * enable image preloading for all e_widget_preview using edje
+
2013-02-07 Mike Blumenkrantz
* added option for remembering filemanager windows globally
diff --git a/NEWS b/NEWS
index 13e30838e..887c7038a 100644
--- a/NEWS
+++ b/NEWS
@@ -96,6 +96,7 @@ Improvements:
* new tab in focus settings for pointer warping
* unify all pointer warp animators
* clock listens to /etc/timezone changes now too
+ * enable image preloading for all e_widget_preview using edje
Fixes:
* IBar menu didn't allow to configure different icon sources, show contents menu even on empty IBar.
diff --git a/src/bin/e_widget_preview.c b/src/bin/e_widget_preview.c
index 86a68c0bb..77bb743ca 100644
--- a/src/bin/e_widget_preview.c
+++ b/src/bin/e_widget_preview.c
@@ -167,6 +167,16 @@ e_widget_preview_file_get(Evas_Object *obj, const char **file, const char **grou
edje_object_file_get(wd->o_thumb, file, group);
}
+static void
+_e_widget_preview_edje_preloaded(void *data, Evas_Object *obj,
+ const char *emission EINA_UNUSED,
+ const char *source EINA_UNUSED)
+{
+ E_Widget_Data *wd = data;
+
+ evas_object_show(wd->o_thumb);
+}
+
EAPI int
e_widget_preview_edje_set(Evas_Object *obj, const char *file, const char *group)
{
@@ -177,7 +187,9 @@ e_widget_preview_edje_set(Evas_Object *obj, const char *file, const char *group)
if (wd->o_thumb) evas_object_del(wd->o_thumb);
wd->o_thumb = edje_object_add(e_livethumb_evas_get(wd->img));
ret = edje_object_file_set(wd->o_thumb, file, group);
- evas_object_show(wd->o_thumb);
+ edje_object_signal_callback_add(wd->o_thumb,
+ "preload,done", "",
+ _e_widget_preview_edje_preloaded, wd);
e_livethumb_thumb_set(wd->img, wd->o_thumb);
e_widget_change(obj);