Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas Modified Files: evas_object_textblock.c Log Message: and double tb2's layout speed... =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -3 -r1.72 -r1.73 --- evas_object_textblock.c 15 Aug 2005 09:43:53 -0000 1.72 +++ evas_object_textblock.c 15 Aug 2005 12:46:16 -0000 1.73 @@ -342,7 +342,8 @@ obj = l->data; o = (Evas_Object_Textblock *)(obj->object_data); - evas_object_textblock2_text_markup_set(obj, o->markup_text); + if (o->markup_text) + evas_object_textblock2_text_markup_set(obj, o->markup_text); } } @@ -378,7 +379,8 @@ { o->style = NULL; } - evas_object_textblock2_text_markup_set(obj, o->markup_text); + if (o->markup_text) + evas_object_textblock2_text_markup_set(obj, o->markup_text); } const Evas_Textblock_Style * @@ -408,7 +410,7 @@ _style_match_tag(Evas_Textblock_Style *ts, char *s) { Evas_Object_List *l; - + for (l = (Evas_Object_List *)ts->tags; l; l = l->next) { Evas_Object_Style_Tag *tag; @@ -505,17 +507,17 @@ } static void -_lines_clear(Evas_Object *obj) +_lines_clear(Evas_Object *obj, Evas_Object_Textblock_Line *lines) { Evas_Object_Textblock *o; o = (Evas_Object_Textblock *)(obj->object_data); - while (o->lines) + while (lines) { Evas_Object_Textblock_Line *ln; - ln = (Evas_Object_Textblock_Line *)o->lines; - o->lines = evas_object_list_remove(o->lines, ln); + ln = (Evas_Object_Textblock_Line *)lines; + lines = evas_object_list_remove(lines, ln); while (ln->items) { Evas_Object_Textblock_Item *it; @@ -811,9 +813,15 @@ o->markup_text = NULL; } _nodes_clear(obj); - _lines_clear(obj); + _lines_clear(obj, o->lines); + o->lines = NULL; o->changed = 1; evas_object_change(obj); + if (!o->style) + { + o->markup_text = strdup(text); + return; + } if (text) { char *s, *p; @@ -1139,7 +1147,8 @@ n->text = _strbuf_append(n->text, (char *)text, &(n->len), &(n->alloc)); cur->node = n; cur->pos = n->len - 1; - _lines_clear(cur->obj); + _lines_clear(cur->obj, o->lines); + o->lines = NULL; o->changed = 1; evas_object_change(cur->obj); } @@ -1171,7 +1180,8 @@ n->text = _strbuf_append(n->text, (char *)format, &(n->len), &(n->alloc)); cur->node = n; cur->pos = 0; - _lines_clear(cur->obj); + _lines_clear(cur->obj, o->lines); + o->lines = NULL; o->changed = 1; evas_object_change(cur->obj); } @@ -1211,7 +1221,8 @@ free(o->markup_text); o->markup_text = NULL; } - _lines_clear(obj); + _lines_clear(obj, o->lines); + o->lines = NULL; o->changed = 1; evas_object_change(obj); } @@ -2264,7 +2275,7 @@ o = (Evas_Object_Textblock *)(obj->object_data); obj->layer->evas->engine.func->context_multiplier_unset(output, context); -#if 1 /* using for some debugging. will go soon */ +#if 0 /* using for some debugging. will go soon */ obj->layer->evas->engine.func->context_color_set(output, context, 230, 160, 30, 100); @@ -2326,11 +2337,15 @@ if ((o->changed) || (o->last_w != obj->cur.geometry.w)) { - _lines_clear(obj); + Evas_Object_Textblock_Line *lines; + + lines = o->lines; + o->lines = NULL; _layout(obj, 0, obj->cur.geometry.w, obj->cur.geometry.h, NULL, NULL); + _lines_clear(obj, lines); o->last_w = obj->cur.geometry.w; updates = evas_object_render_pre_prev_cur_add(updates, obj); o->changed = 0; ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs