Canvas layout: fix legacy text set
authorDaniel Hirt <hirt.danny@gmail.com>
Sun, 1 Oct 2017 08:37:42 +0000 (11:37 +0300)
committerDaniel Hirt <hirt.danny@gmail.com>
Sun, 1 Oct 2017 09:00:56 +0000 (12:00 +0300)
Keep the legacy code path when using edje_object_part_text_set.
Fixes e's notification that got broken after
3642b3ae679e3bedba4155fb9e54b44483b3b9e1.

Also, limit new efl_text_markup set to TEXTBLOCK parts.

src/lib/edje/edje_util.c

index 8ed6cc3..c175c14 100644 (file)
@@ -1861,7 +1861,7 @@ _edje_object_part_text_raw_generic_set(Edje *ed, Evas_Object *obj, Edje_Real_Par
    else
    if (text)
      {
-        if (set_markup)
+        if (set_markup && (rp->part->type == EDJE_PART_TYPE_TEXTBLOCK))
           {
              char *mkup;
              mkup =
@@ -6134,7 +6134,7 @@ edje_object_part_swallow_get(const Edje_Object *obj, const char *part)
 EAPI Eina_Bool
 edje_object_part_text_set(const Edje_Object *obj, const char *part, const char *text)
 {
-   efl_text_markup_set(efl_part(obj, part), text);
+   efl_text_set(efl_part(obj, part), text);
    return EINA_TRUE;
 }