aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2013-02-11 09:59:47 +0000
committerCedric BAIL <cedric.bail@free.fr>2013-02-11 09:59:47 +0000
commit377c99635872da365388f434ad7cb4824fe78175 (patch)
treea495dfc5eeccf82c67fd5c4cf01013473e355c5a
parent0d8d7a8f7b911863cba8b2044326f6f41cbd6613 (diff)
downloadenlightenment-377c99635872da365388f434ad7cb4824fe78175.tar.gz
enlightenment-377c99635872da365388f434ad7cb4824fe78175.tar.xz
enlightenment-377c99635872da365388f434ad7cb4824fe78175.zip
e: backport r83815.
SVN revision: 83816
-rw-r--r--src/bin/e_livethumb.c20
-rw-r--r--src/bin/e_widget_preview.c13
2 files changed, 19 insertions, 14 deletions
diff --git a/src/bin/e_livethumb.c b/src/bin/e_livethumb.c
index 2eac1eb0f..96d4af4a1 100644
--- a/src/bin/e_livethumb.c
+++ b/src/bin/e_livethumb.c
@@ -67,6 +67,14 @@ e_livethumb_vsize_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
if (h) *h = sd->vh;
}
+static void
+_e_livethumb_edje_preloaded(void *data EINA_UNUSED, Evas_Object *obj,
+ const char *emission EINA_UNUSED,
+ const char *source EINA_UNUSED)
+{
+ evas_object_show(obj);
+}
+
EAPI void
e_livethumb_thumb_set(Evas_Object *obj, Evas_Object *thumb)
{
@@ -77,7 +85,17 @@ e_livethumb_thumb_set(Evas_Object *obj, Evas_Object *thumb)
return;
}
sd->thumb_obj = thumb;
- evas_object_show(sd->thumb_obj);
+ if (!strcmp(evas_object_type_get(thumb), "edje"))
+ {
+ edje_object_signal_callback_add(thumb,
+ "preload,done", "",
+ _e_livethumb_edje_preloaded, NULL);
+ edje_object_preload(thumb, EINA_FALSE);
+ }
+ else
+ {
+ evas_object_show(sd->thumb_obj);
+ }
evas_object_move(sd->thumb_obj, 0, 0);
evas_object_resize(sd->thumb_obj, sd->vw, sd->vh);
}
diff --git a/src/bin/e_widget_preview.c b/src/bin/e_widget_preview.c
index 83046f572..7b9b28463 100644
--- a/src/bin/e_widget_preview.c
+++ b/src/bin/e_widget_preview.c
@@ -167,16 +167,6 @@ 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 EINA_UNUSED,
- 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)
{
@@ -187,9 +177,6 @@ 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);
- 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);