Edje text_classes: Fixed usage of stringshare_replace.

SVN revision: 73603
This commit is contained in:
Tom Hacohen 2012-07-12 08:10:24 +00:00
parent c62f3a2bb5
commit ae1d0e3a9b
1 changed files with 3 additions and 7 deletions

View File

@ -826,8 +826,7 @@ edje_text_class_set(const char *text_class, const char *font, Evas_Font_Size siz
return EINA_TRUE;
/* Update the class found */
eina_stringshare_del(tc->font);
tc->font = eina_stringshare_add(font);
eina_stringshare_replace(&tc->font, font);
tc->size = size;
}
@ -926,9 +925,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
return EINA_TRUE;
/* Update new text class properties */
if (tc->font) eina_stringshare_del(tc->font);
if (font) tc->font = eina_stringshare_add(font);
else tc->font = NULL;
eina_stringshare_replace(&tc->font, font);
tc->size = size;
/* Update edje */
@ -951,8 +948,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
free(tc);
return EINA_FALSE;
}
if (font) tc->font = eina_stringshare_add(font);
else tc->font = NULL;
tc->font = eina_stringshare_add(font);
tc->size = size;
for (i = 0; i < ed->table_parts_size; i++)