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 some whitespace wrapping mojo

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- evas_object_textblock.c     5 Sep 2005 08:01:15 -0000       1.91
+++ evas_object_textblock.c     5 Sep 2005 09:03:01 -0000       1.92
@@ -1390,7 +1390,7 @@
    
    p = evas_common_font_utf8_get_last((unsigned char *)(it->text), 
strlen(it->text));
    tp = p;
-   if (p > 0)
+   if (p >= 0)
 /*   while (p >= 0)*/
      {
        chr = evas_common_font_utf8_get_prev((unsigned char *)(it->text), &p);
@@ -1661,6 +1661,8 @@
                                      if (it->text) free(it->text);
                                      _format_free(c->obj, it->format);
                                      free(it);
+                                     it = (Evas_Object_Textblock_Item 
*)((Evas_Object_List *)c->ln->items)->last;
+                                     _layout_strip_trailing_whitespace(c, fmt, 
it);
                                      twrap = _layout_word_end(str, wrap);
                                      ch = 
evas_common_font_utf8_get_next((unsigned char *)str, &twrap);
                                      str = str + twrap;
@@ -1710,17 +1712,15 @@
                         }
                       else
                         {
+#if 1                      
                            /* wrap now is the index of the word START */
-                           if (wrap == 0)
+                           index = wrap;
+                           ch = evas_common_font_utf8_get_next((unsigned char 
*)str, &index);
+                           if (!_is_white(ch) && 
+                               (!_layout_last_item_ends_in_whitespace(c)))
                              {
-                                index = wrap;
-                                ch = evas_common_font_utf8_get_next((unsigned 
char *)str, &index);
-                                if (!_is_white(ch) && 
-                                    (!_layout_last_item_ends_in_whitespace(c)))
-                                  {
-                                     _layout_walk_back_to_item_word_redo(c, 
it);
-                                     return;
-                                  }
+                                _layout_walk_back_to_item_word_redo(c, it);
+                                return;
                              }
                            if (c->ln->items != NULL)
                              {
@@ -1733,7 +1733,8 @@
                                   {
                                      wrap = 0;
                                      twrap = _layout_word_end(it->text, wrap);
-                                     wrap = _layout_word_next(it->text, wrap);
+                                     wrap = twrap;
+                                     ch = 
evas_common_font_utf8_get_next((unsigned char *)str, &wrap);
                                      if (twrap >= 0)
                                        _layout_item_text_cutoff(c, it, twrap);
                                      if (wrap > 0)
@@ -1745,6 +1746,7 @@
                                   str = NULL;
                              }
                         }
+#endif                
                    }
                  else if (fmt->wrap_char)
                    {




-------------------------------------------------------
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

Reply via email to