EINA_INLIST;
Evas_Object_Textblock_Item *items;
Evas_Object_Textblock_Paragraph *par;
- Evas_Object_Textblock_Text_Item *ellip_ti;
Evas_Coord x, y, w, h;
int baseline;
int line_no;
Evas_Object_Textblock_Node_Text *text_nodes;
Evas_Object_Textblock_Node_Format *format_nodes;
Evas_Object_Textblock_Paragraph *paragraphs;
+ Evas_Object_Textblock_Text_Item *ellip_ti;
Eina_Rbtree *par_index;
Eina_List *anchors_a;
Eina_List *anchors_item;
* @param ln the layout line to be freed, must not be NULL.
*/
static void
-_line_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln)
+_line_free(Evas_Object_Textblock_Line *ln)
{
/* Items are freed from the logical list, except for the ellip item */
- if (ln->ellip_ti) _item_free(obj, NULL, _ITEM(ln->ellip_ti));
if (ln) free(ln);
}
* Free the visual lines in the paragraph (logical items are kept)
*/
static void
-_paragraph_clear(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par)
+_paragraph_clear(const Evas_Object *obj __UNUSED__,
+ Evas_Object_Textblock_Paragraph *par)
{
while (par->lines)
{
ln = (Evas_Object_Textblock_Line *) par->lines;
par->lines = (Evas_Object_Textblock_Line *)eina_inlist_remove(EINA_INLIST_GET(par->lines), EINA_INLIST_GET(par->lines));
- _line_free(obj, ln);
+ _line_free(ln);
}
}
Evas_Script_Type script;
Evas_Font_Instance *script_fi = NULL, *cur_fi;
size_t len = 1; /* The length of _ellip_str */
- ellip_ti = _layout_text_item_new(c,
+
+ /* We can free it here, cause there's only one ellipsis item per tb. */
+ if (c->o->ellip_ti) _item_free(c->obj, NULL, _ITEM(c->o->ellip_ti));
+ c->o->ellip_ti = ellip_ti = _layout_text_item_new(c,
eina_list_data_get(eina_list_last(c->format_stack)));
ellip_ti->parent.text_node = cur_it->text_node;
ellip_ti->parent.text_pos = cur_it->text_pos;
c->ln->items = (Evas_Object_Textblock_Item *)
eina_inlist_append(EINA_INLIST_GET(c->ln->items),
EINA_INLIST_GET(_ITEM(ellip_ti)));
- c->ln->ellip_ti = ellip_ti;
_layout_line_finalize(c, ellip_ti->parent.format);
}
free(cur);
}
if (o->repch) eina_stringshare_del(o->repch);
+ if (o->ellip_ti) _item_free(obj, NULL, _ITEM(o->ellip_ti));
o->magic = 0;
EVAS_MEMPOOL_FREE(_mp_obj, o);
_format_command_shutdown();