Enlightenment CVS committal Author : sebastid Project : e17 Module : proto
Dir : e17/proto/enterminus/src/bin Modified Files: smart.c Log Message: Createing and deleting evas objects take time!!! =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/enterminus/src/bin/smart.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- smart.c 28 Feb 2005 12:16:39 -0000 1.10 +++ smart.c 28 Feb 2005 12:44:59 -0000 1.11 @@ -244,9 +244,14 @@ size = (num_chars_h * num_chars_w) - (term->cols * term->rows); /* Free grid */ - for (i = 0; i < (term->cols * term->rows); i++) { - gl = &term->grid[0][i]; - if (gl->text) evas_object_del(gl->text); + if (size < 0) { + int start, end; + start = num_chars_h * num_chars_w; + end = term->cols * term->rows; + for (i = start; i < end; i++) { + gl = &term->grid[0][i]; + if (gl->text) evas_object_del(gl->text); + } } if ((term->grid = realloc(term->grid, @@ -266,11 +271,16 @@ term->grid[i] = &term->grid[i - 1][num_chars_w]; /* Init grid */ - for (i = 0; i < (num_chars_h * num_chars_w); i++) { - gl = &term->grid[0][i]; - gl->text = evas_object_text_add(term->evas); - evas_object_layer_set(gl->text, 2); - evas_object_show(gl->text); + if (size > 0) { + int start, end; + start = term->cols * term->rows; + end = num_chars_h * num_chars_w; + for (i = start; i < end; i++) { + gl = &term->grid[0][i]; + gl->text = evas_object_text_add(term->evas); + evas_object_layer_set(gl->text, 2); + evas_object_show(gl->text); + } } #if 0 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs