aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_widget_image.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2006-03-04 04:11:51 +0000
committerCarsten Haitzler <raster@rasterman.com>2006-03-04 04:11:51 +0000
commitb089c7d1e34af1b5cded38dcfd83553322383eb1 (patch)
tree7725a1feabd25ca55070291e84792d71283a4184 /src/bin/e_widget_image.c
parentremove module cruft we dont use. (diff)
downloadenlightenment-b089c7d1e34af1b5cded38dcfd83553322383eb1.tar.gz
add a preview widget (includes a livethumb for live downscaling - notice
previews of animated bgs's... animate now). fixed problems with image widget withleaks and other stuff... also desklok tries to abord if grabs fail and agressively tries to disable existing grabs SVN revision: 20987
Diffstat (limited to 'src/bin/e_widget_image.c')
-rw-r--r--src/bin/e_widget_image.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/e_widget_image.c b/src/bin/e_widget_image.c
index 848c00213..185538cb3 100644
--- a/src/bin/e_widget_image.c
+++ b/src/bin/e_widget_image.c
@@ -9,6 +9,8 @@ struct _E_Widget_Data
Evas_Object *img;
};
+static void _e_wid_del_hook(Evas_Object *obj);
+
/* local subsystem functions */
/* externally accessible functions */
@@ -19,6 +21,7 @@ e_widget_image_add_from_object(Evas *evas, Evas_Object *object, int minw, int mi
E_Widget_Data *wd;
obj = e_widget_add(evas);
+ e_widget_del_hook_set(obj, _e_wid_del_hook);
wd = calloc(1, sizeof(E_Widget_Data));
evas_object_show(object);
@@ -52,6 +55,7 @@ e_widget_image_add_from_file(Evas *evas, char *file, int minw, int minh)
wd->img = o;
evas_object_show(o);
+ e_widget_data_set(obj, wd);
e_widget_can_focus_set(obj, 0);
e_widget_min_size_set(obj, minw, minh);
e_widget_sub_object_add(obj, o);
@@ -99,3 +103,13 @@ e_widget_image_object_set(Evas_Object *obj, Evas_Object *o)
e_icon_object_set(wd->img, o);
evas_object_show(wd->img);
}
+
+
+static void
+_e_wid_del_hook(Evas_Object *obj)
+{
+ E_Widget_Data *wd;
+
+ wd = e_widget_data_get(obj);
+ free(wd);
+}