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:
fix spaces at start of nodes and lines
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -3 -r1.106 -r1.107
--- evas_object_textblock.c 18 Sep 2005 11:55:51 -0000 1.106
+++ evas_object_textblock.c 18 Sep 2005 12:42:34 -0000 1.107
@@ -1427,7 +1427,6 @@
p = evas_common_font_utf8_get_last((unsigned char *)(it->text),
strlen(it->text));
tp = p;
if (p >= 0)
-/* while (p >= 0)*/
{
chr = evas_common_font_utf8_get_prev((unsigned char *)(it->text), &p);
if (_is_white(chr))
@@ -1444,20 +1443,6 @@
c->x = it->x + adv;
return 1;
}
-/*
- if (!_is_white(chr))
- {
- evas_common_font_utf8_get_next((unsigned char *)(it->text), &tp);
- _layout_item_text_cutoff(c, it, tp);
- adv = c->ENFN->font_h_advance_get(c->ENDT, it->format->font.font,
it->text);
- c->ENFN->font_string_size_get(c->ENDT, it->format->font.font,
it->text, &tw, &th);
- it->w = tw;
- it->h = th;
- c->x = it->x + adv;
- return;
- }
- tp = p;
- */
}
return 0;
}
@@ -1568,14 +1553,6 @@
new_it->source_pos = pit->source_pos + index;
_layout_item_text_cutoff(c, pit, index);
_layout_strip_trailing_whitespace(c, pit->format, pit);
-/* ***
- if (!white_stripped)
- {
- index = 0;
- ch = evas_common_font_utf8_get_next((unsigned char *)str,
&index);
- if (_is_white(ch)) str += index;
- }
- */
break;
}
}
@@ -1650,6 +1627,7 @@
/* if this is the first line item and it starts with spaces - remove
them */
wrap = 0;
white_stripped = 0;
+/*
if (!c->ln->items)
{
twrap = wrap;
@@ -1661,6 +1639,7 @@
}
str = str + twrap;
}
+ */
it = _layout_item_new(c, fmt, str);
it->source_node = n;
it->source_pos = str - n->text;
@@ -1678,12 +1657,14 @@
{
if (fmt->wrap_word)
{
- wrap = _layout_word_start(str, wrap);
+ index = wrap;
+ ch = evas_common_font_utf8_get_next((unsigned char
*)str, &index);
+ if (!_is_white(ch))
+ wrap = _layout_word_start(str, wrap);
if (wrap > 0)
{
twrap = wrap;
ch = evas_common_font_utf8_get_prev((unsigned char
*)str, &twrap);
-//
/* the text intersects the wrap point on a
whitespace char */
if (_is_white(ch))
{
@@ -1717,51 +1698,9 @@
str = str + twrap;
}
}
-#if 0
- ch = evas_common_font_utf8_get_prev((unsigned char
*)str, &twrap);
- while (_is_white(ch) && (twrap >= 0))
- ch = evas_common_font_utf8_get_prev((unsigned
char *)str, &twrap);
- if (!_is_white(ch))
- {
- if (twrap >= 0)
- evas_common_font_utf8_get_next((unsigned
char *)str, &twrap);
- else twrap = 0;
- evas_common_font_utf8_get_next((unsigned char
*)str, &twrap);
- }
- else
- twrap = 0;
- if (twrap == 0)
- {
- int ptwrap;
-
- empty_item = 1;
- if (it->text) free(it->text);
- _format_free(c->obj, it->format);
- free(it);
- ptwrap = twrap;
- for (;;)
- {
- ch =
evas_common_font_utf8_get_next((unsigned char *)str, &twrap);
- if (twrap < 0)
- {
- ptwrap = twrap;
- break;
- }
- if (!_is_white(ch)) break;
- ptwrap = twrap;
- }
- str = str + ptwrap;
- }
- else
- {
- _layout_item_text_cutoff(c, it, twrap);
- str = str + wrap;
- }
-#endif
}
else
{
-#if 1
/* wrap now is the index of the word START */
index = wrap;
ch = evas_common_font_utf8_get_next((unsigned char
*)str, &index);
@@ -1795,7 +1734,6 @@
str = NULL;
}
}
-#endif
}
else if (fmt->wrap_char)
{
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs