Enlightenment CVS committal
Author : atmosphere
Project : misc
Module : engage
Dir : misc/engage/src
Modified Files:
icon.c
Log Message:
don't allocate tt objects in the icon unless EngageIcon is absent, delete icon->pic too
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/icon.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- icon.c 20 Apr 2004 21:24:17 -0000 1.19
+++ icon.c 20 Apr 2004 23:16:53 -0000 1.20
@@ -182,8 +182,8 @@
ret->name = strdup(name);
ret->scale = 0.0;
Evas_Object *icon = ret->icon = edje_object_add(evas);
- Evas_Object *tt_txt = ret->tt_txt = evas_object_text_add(evas);
- Evas_Object *tt_shd = ret->tt_shd = evas_object_text_add(evas);
+ Evas_Object *tt_txt = NULL;
+ Evas_Object *tt_shd = NULL;
ret->arrow = NULL;
ret->state = 0;
@@ -246,6 +246,8 @@
if (edje_object_part_exists(icon, "EngageName")) {
edje_object_part_text_set(icon, "EngageName", name);
} else {
+ tt_txt = ret->tt_txt = evas_object_text_add(evas);
+ tt_shd = ret->tt_shd = evas_object_text_add(evas);
evas_object_text_font_set(tt_txt, options.tt_fa, options.tt_fs);
evas_object_text_text_set(tt_txt, name);
evas_object_color_set(tt_txt,
@@ -294,8 +296,12 @@
}
evas_object_del(icon->icon);
- evas_object_del(icon->tt_txt);
- evas_object_del(icon->tt_shd);
+ if (icon->pic)
+ evas_object_del(icon->pic);
+ if (icon->tt_txt)
+ evas_object_del(icon->tt_txt);
+ if (icon->tt_shd)
+ evas_object_del(icon->tt_shd);
if (icon->arrow)
evas_object_del(icon->arrow);
free(icon->name);
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs