diff options
author | Andy Williams <andy@andywilliams.me> | 2016-11-12 21:23:40 +0000 |
---|---|---|
committer | Andy Williams <andy@andywilliams.me> | 2016-11-12 21:23:40 +0000 |
commit | 202dc8c189612fd4fca34aa85a5fb17a2c72d5f6 (patch) | |
tree | 40b412c0ac66a58e45a39a112636dd23433934e3 | |
parent | cbde2cb04b3096c0854b3cfebd455d3383c16ea7 (diff) | |
download | efl-202dc8c189612fd4fca34aa85a5fb17a2c72d5f6.tar.gz |
elm: Allow setting NULL tooltip text to remove tooltip.
As discussed on the mailing list.
-rw-r--r-- | src/lib/elementary/els_tooltip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/elementary/els_tooltip.c b/src/lib/elementary/els_tooltip.c index f5c54251a3..e601176301 100644 --- a/src/lib/elementary/els_tooltip.c +++ b/src/lib/elementary/els_tooltip.c @@ -950,7 +950,12 @@ EAPI void elm_object_tooltip_text_set(Evas_Object *obj, const char *text) { EINA_SAFETY_ON_NULL_RETURN(obj); - EINA_SAFETY_ON_NULL_RETURN(text); + + if (!text) + { + elm_object_tooltip_unset(obj); + return; + } text = eina_stringshare_add(text); elm_object_tooltip_content_cb_set |