furrymyad pushed a commit to branch efl-1.16. http://git.enlightenment.org/core/efl.git/commit/?id=b7777831233d2ad96225291373fd5320ebc26db9
commit b7777831233d2ad96225291373fd5320ebc26db9 Author: Mykyta Biliavskyi <[email protected]> Date: Tue Jul 5 20:18:32 2016 +0300 Edje_Edit: allow set NULL as a style name for textblock part. NULL as 'style' value remove style name from textblock part state. --- src/lib/edje/Edje_Edit.h | 3 ++- src/lib/edje/edje_edit.c | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h index cedf43c..b0c7f91 100644 --- a/src/lib/edje/Edje_Edit.h +++ b/src/lib/edje/Edje_Edit.h @@ -5822,7 +5822,8 @@ EAPI const char * edje_edit_state_text_style_get(Evas_Object *obj, const char *p * @param part Part to set the style of. * @param state State in which the style is set. * @param value Value of the state. - * @param style The style name to use. + * @param style The style name to use. In case when NULL style will removed from textblock part description. + * * * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise. */ diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 924ce20..0d2db04 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -8127,7 +8127,15 @@ edje_edit_state_text_style_set(Evas_Object *obj, const char *part, const char *s return EINA_FALSE; txt = (Edje_Part_Description_Text *)pd; - _edje_if_string_replace(ed, &txt->text.style.str, style); + if (style == NULL ) + { + _edje_if_string_free(ed, &txt->text.style.str); + txt->text.style.str = NULL; + } + else + { + _edje_if_string_replace(ed, &txt->text.style.str, style); + } edje_object_calc_force(obj); return EINA_TRUE; --
