Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_text.c 


Log Message:
- fix alignment in ewl_text

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -3 -r1.113 -r1.114
--- ewl_text.c  16 Aug 2006 16:10:01 -0000      1.113
+++ ewl_text.c  6 Sep 2006 17:28:54 -0000       1.114
@@ -2402,25 +2402,20 @@
        }
 
        /* create the alignment string */
-       if (ctx->align > 0)
-       {
-               if (ctx->align & EWL_FLAG_ALIGN_CENTER)
-                       snprintf(align, sizeof(align), "align=center");
+       if (ctx->align == EWL_FLAG_ALIGN_CENTER)
+               snprintf(align, sizeof(align), "align=center");
 
-               else if (ctx->align & EWL_FLAG_ALIGN_RIGHT)
-                       snprintf(align, sizeof(align), "align=right");
+       else if (ctx->align == EWL_FLAG_ALIGN_RIGHT)
+               snprintf(align, sizeof(align), "align=right");
 
-               else
-                       snprintf(align, sizeof(align), "align=left");   
-       }
        else
-               snprintf(align, sizeof(align), "align=left");
+               snprintf(align, sizeof(align), "align=left");   
 
        ptr = ewl_theme_path_get();
        /* create the formatting string */
        snprintf(fmt, 2048, "+font=fonts/%s font_source=%s font_size=%d "
                        "backing_color=#%02x%02x%02x%02x 
color=#%02x%02x%02x%02x "
-                       "%s wrap=%s %s\n", ctx->font, 
+                       "%s wrap=%s %s", ctx->font, 
                        ptr, ctx->size,
                        ctx->style_colors.bg.r, ctx->style_colors.bg.g,
                        ctx->style_colors.bg.b, ctx->style_colors.bg.a,
@@ -4115,6 +4110,7 @@
        }
 
        /* XXX grap the alignment and wrap data from the theme here */
+       tmp->align = EWL_FLAG_ALIGN_LEFT;
 
        tx = ewl_text_context_find(tmp, EWL_TEXT_CONTEXT_MASK_NONE, NULL);
        ewl_text_context_release(tmp);
@@ -4808,7 +4804,7 @@
 
                /* set the current context */
                old_tx = t->formatting.current->tx;
-               t->formatting.current->tx= ewl_text_context_find(old_tx, 
+               t->formatting.current->tx = ewl_text_context_find(old_tx, 
                                                        context_mask, tx);
                ewl_text_context_release(old_tx);
        }



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to