Evas textblock: Did a bit of code clean-up.

SVN revision: 56543
This commit is contained in:
Tom Hacohen 2011-01-30 10:45:51 +00:00
parent 5a5ebae319
commit f247b0d480
1 changed files with 6 additions and 14 deletions

View File

@ -4020,18 +4020,14 @@ evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts)
TB_HEAD();
if (ts == o->style) return;
if ((ts) && (ts->delete_me)) return;
if (o->markup_text)
{
if (o->style)
{
free(o->markup_text);
o->markup_text = NULL;
evas_object_textblock_text_markup_get(obj);
}
}
if (o->style)
{
Evas_Textblock_Style *old_ts;
if (o->markup_text)
{
free(o->markup_text);
o->markup_text = NULL;
}
old_ts = o->style;
old_ts->objects = eina_list_remove(old_ts->objects, obj);
@ -4041,12 +4037,8 @@ evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts)
if (ts)
{
ts->objects = eina_list_append(ts->objects, obj);
o->style = ts;
}
else
{
o->style = NULL;
}
o->style = ts;
_evas_textblock_text_node_changed(o, obj, NULL);
}